dummy.cpp:
#include <functional>
void foo(std::function<void(void)> f) {}
And the compile command:
clang++ -c -mmacosx-version-min=10.6 -std=c++11 dummy.cpp -o dummy.o
That fails with various errors (std::function
is unknown). However, without -mmacosx-version-min=10.6
, it works fine.
Why is that? Can I somehow get C++11 support with -mmacosx-version-min=10.6
?
My current workaround: Use Boost instead for such containers, e.g. boost::function
. Other syntactic stuff from C++11 can be used without issues.