c++11 - I am trying use vlog inside static lamba giving me error: statement-expressions are not allowed outside funstions nor in template-argument lists -


i wrote global static lambda following:

 static auto x = [] (const std::string& y){    vlog(3) <<" y:" <<y;   }; 

it giving me error on vlog statement.:

 statement-expressions not allowed outside functions nor in template-argument lists 

this result of decision made leave room optimizations. relevant bug report here in attempt reopen discussion, , mentions type of use case. compiling without optimizations should work, though know that's lame suggestion. problem lambda being @ global scope, solution brings function should good.


Comments

Popular posts from this blog

android - questions about switching from C2DM to GCM -

c++ - Qt setGeometry: Unable to set geometry -

batch file - How to extract all multi-volume RAR archives from subfolders of a folder? -