|
-
April 2nd, 2012, 07:55 AM
#5
Re: for_each and member function
Peter_B, thanks for this explanation. It didn't come to my mind that the reference might be the problem. I have played around with the bar() signature, making it const or not, making the parameter to bar const or not, but never thought about the reference. Then I changed bar() to take an int, and that worked, leaving me even more confused.
superbonzo, I was so concentrated on the member function that the lambda you propose didn't come to my mind.
Thanks for your contributions,
Richard
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|