I have the following erroneous code which I am trying to compile in VC2010, but I\'m getting the error C2974 this only occurs when I include the lambda expression, so I\'m g
First define the lambda object, then pass it to the template's type using decltype and also pass it directly to the constructor.
decltype
auto comp = []( adjist a, adjlist b ) { return a.second > b.second; }; priority_queue< adjlist_edge , vector, decltype( comp ) > adjlist_pq( comp );