FLIF-hub / FLIF

Free Lossless Image Format
Other
3.72k stars 229 forks source link

#include <functional> to fix clang compile error #387

Closed saschanaz closed 7 years ago

saschanaz commented 7 years ago

The current code is failing to be compiled on Clang because of this error:

In file included from submodules/flif/src/library/flif-interface.cpp:1:
submodules/flif/src/library/flif-interface_dec.cpp:250:27: error: no member named 'function' in namespace 'std'
        auto func = (std::function<void ()> *) info->populateContext;
                     ~~~~~^
submodules/flif/src/library/flif-interface_dec.cpp:250:46: error: expected expression
        auto func = (std::function<void ()> *) info->populateContext;
                                             ^
2 errors generated.

Including <functional> fixes this issue.