c++ cli - Lambdas don't appear to work within ref classes in VS2010 -


one of cool new c++ features in visual studio 2010 lambda expressions. however, can't them work within managed class.

class unmanagedclass {     void foo() {         // creating empty lambda within unmanaged class.         // compiles fine.         auto lambda = [](){ ; };     } };  ref class managedclass {     void foo() {         // creating empty lambda within managed class.         // creates error c3809:         // managed type cannot have friend functions/classes/interfaces.         auto lambda = [](){ ; };     } }; 

my best guess compiler creates anonymous function class friend class, though never use class members. seems mean lambdas cannot used @ within ref classes.

i happy when read vs2010 adds lambda expressions c++. know how them work within ref classes?

looks like being considered future versions. otherwise known as: "we'll it."


Comments

Popular posts from this blog

How has firefox/gecko HTML+CSS rendering changed in version 38? -

android - CollapsingToolbarLayout: position the ExpandedText programmatically -

Listeners to visualise results of load test in JMeter -