i need to to use c++ find_if() lambda expression, in my vc compiler it compiles without any errors, and i can't compile it in linux:debian:g++4.4 :
-CPP function:
istream_iterator<string> it = find_if(istream_iterator<string>(ss),
f,
[=](const string& str)
{return str == to_string(urlHash);});
-Error output:
-error: expected primary-expression before '[' token
-error: expected primary-expression before '=' token
-error: expected primary-expression before ']' token
-error: expected primary-expression before 'const'
question 1 : is this a version related problem of c++, despite using the -std=c++0x flag, nothing changes.
question 2 : i can't use -std=c++11 flag, despite that i installed the gcc 4.7 in my machine.
thanks;