Currently my project has the following simple tree:
./Makefile.am
./configure.ac
./README
./src/main.cpp
./src/Makefile.am
./bin
I’m trying to following the following tutorial:
http://www.gnu.org/software/automake/manual/automake.html#Hello-World
How can I instruct configure.ac to use the C++0x extensions? In particular, what if the hello-world line in main.cpp file is as follows:
cout << ([] () {return "Hello, World!";}) () << endl;
Issuing “make” results in an error.
If you’re using gcc (looks like you are) then from the libstdc++ manual they have autoconf examples for checking c++ base language features:
You could probably try to put a lambda in there if you wanted. Then with HAVE_STDCXX_0X in hand you could set –std=c++0x appropriately.