nakiya
nakiya

Reputation: 14423

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?

Upvotes: 8

Views: 2764

Answers (1)

Georg Fritzsche
Georg Fritzsche

Reputation: 99044

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.

Upvotes: 10

Related Questions