Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

g++ how to check if it supports lambda functions?

So much talk about lambda functions... So I tried to write mine. :(. It did not work. Does g++ 4.3.2 support lambda functions? How to find out whether it supports a certain c++0x feature or not?

like image 349
nakiya Avatar asked Nov 08 '10 22:11

nakiya


1 Answers

Take a look at Apaches C++0x Compiler Support page or GCCs C++0x pages. Only GCC >= 4.5 supports lambda functions.

If you need to write something that optionally takes advantage of lambda support you could do so conditionally depending on the GCC version or Boost.Configs BOOST_NO_LAMBDAS.

like image 112
Georg Fritzsche Avatar answered Sep 29 '22 16:09

Georg Fritzsche