error: no match for 'operator*

Hi there,

I’m attempting to use the SimpleTime library (the specific version) from here: Arduino Playground - SimpleTimer Library
but am getting the error:

..\SimpleTimer.cpp: In member function 'void SimpleTimer::run()':

..\SimpleTimer.cpp:100:18: error: no match for 'operator*' (operand type is 'timer_callback {aka std::function<void()>}')

                 (*callbacks[i])();

                  ^

..\SimpleTimer.cpp:104:18: error: no match for 'operator*' (operand type is 'timer_callback {aka std::function<void()>}')

                 (*callbacks[i])();

Anyone got any ideas what’s going on?

I’ve attached the library code here
Thanks in advance! :slight_smile:

SimpleTimer.zip (6.61 KB)

Show YOUR code that is trying to use the library.

the example in the folder just compiles fine for me (with a warning that you can get rid off if you add unsigned for the delays (edit the .h)

    // delay values
    [color=red]unsigned[/color] long delays[MAX_TIMERS];

I was testing the example code when i got the error, not the code i want to use the simpletimer with.

J-M-L: the example in the folder just compiles fine for me (with a warning that you can get rid off if you add unsigned for the delays (edit the .h)

    // delay values
    [color=red]unsigned[/color] long delays[MAX_TIMERS];

What version of the arduino IDE are you using? I'm on an old version for compatibility reasons (1.8.4)

I compiled with 1.8.12

I moved both the .cpp and .h in the code example folder and changed #include <SimpleTimer.h>into#include "SimpleTimer.h" to be sure to use that specific library

can you post the full compiler (verbose) error ?