Jump to content
  • Advertisement
Sign in to follow this  
Quat

boost::lambda predicate

This topic is 2640 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I want to sort my lights by technique, but do not know how to access a data member from the lambda parameters. I am trying something like:

sort(lights.begin(), lights.end(), (_1.Tech < _2.Tech) );

but get error C2039: 'Tech' : is not a member of 'boost::arg<I>'

Share this post


Link to post
Share on other sites
Advertisement
You can't access data members from lambda parameters. Think about how that could possibly be implemented. (It can't be.) You can overload functions but not that.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!