
19 Jun
2012
19 Jun
'12
6:25 p.m.
When trying to compile the following:
std::vector<int> v;
v | boost::adaptors::transformed([] (int x) { return x; });
I get a bunch of compile errors. If I replace the lambda with a function
defined normally, it works.
Am I doing something wrong, or is this a bug/missing feature/something?
I'm compiling with GCC 4.6.1 (though 4.7.1 has the same problem) and
have Boost 1.49.
The output and full program are attached. The main part (dropping the
"instantiated from..."s) of the first error is:
boost/utility/result_of.hpp:82:8: error: no class template named
‘result’ in ‘struct main()::