The <functional>
header and its functionality do not exist on the AVR GCC/G++ compiler. I highly recommend to not use the C++ standard library on these extremely constrained microcontroller devices anyway; Alternative and supplements to AVR-GCC’s lacking stdlib implementation still exist though: see Arduino c++11 or c++14 support in platform IO - #3 by maxgerhardt, where this exact topic was already discussed.