Re: [Boost-users] A question on data change with lambda expression. Can any one with kindness help me?

Can any experts with kindness help me? I really need the answer. I have tried my best to program with c++. And I want to be familiar with lambda. Thanks a lot.

AMDG fmingu wrote:
Can any experts with kindness help me? I really need the answer. I have tried my best to program with c++. And I want to be familiar with lambda.
Same answer as here http://lists.boost.org/boost-users/2009/07/49660.php In Christ, Steven Watanabe

Do you mean : ( bind(&IIPrimemap::value_type::second,(*bind(static_cast<IIPrimemap::iterator (IIPrimemap::*)()> (&IIPrimemap::end),var(primemapvec))))())++; or: bind(&IIPrimemap::value_type::second,(*bind(static_cast<IIPrimemap::iterator (IIPrimemap::*)()> (&IIPrimemap::end),var(primemapvec))))()++; ? but I still can not get the changed value. Can you give me further suggestions? Thanks a lot. 在2009-07-11,"Steven Watanabe" <watanabesj@gmail.com> 写道:
AMDG
fmingu wrote:
Can any experts with kindness help me? I really need the answer. I have tried my best to program with c++. And I want to be familiar with lambda.
Same answer as here http://lists.boost.org/boost-users/2009/07/49660.php
In Christ, Steven Watanabe

2009/7/10 fmingu <fmingu@163.com>:
Do you mean : ( bind(&IIPrimemap::value_type::second,(*bind(static_cast<IIPrimemap::iterator (IIPrimemap::*)()> (&IIPrimemap::end),var(primemapvec))))())++; or: bind(&IIPrimemap::value_type::second,(*bind(static_cast<IIPrimemap::iterator (IIPrimemap::*)()> (&IIPrimemap::end),var(primemapvec))))()++; ? but I still can not get the changed value. Can you give me further suggestions? Thanks a lot.
Honestly that code is really hard to read, and seems like an abuse of lambda expressions. Are you planning on using that in real code or are you just trying to do this as an exercise?

I used lambda expression in my real code. Indeed,this line is just a part of a lambda expression body,if I give up the line then the whole body will change too. You may think it is unwise. Please help me to solve it. Thanks a lot. 在2009-07-11,"Zachary Turner" <divisortheory@gmail.com> 写道:
2009/7/10 fmingu <fmingu@163.com>:
Do you mean : ?? ( bind(&IIPrimemap::value_type::second,(*bind(static_cast<IIPrimemap::iterator (IIPrimemap::*)()> (&IIPrimemap::end),var(primemapvec))))())++; or: ?bind(&IIPrimemap::value_type::second,(*bind(static_cast<IIPrimemap::iterator (IIPrimemap::*)()> (&IIPrimemap::end),var(primemapvec))))()++; ? but I still can not get the changed value. Can you give me further suggestions? Thanks a lot.
Honestly that code is really hard to read, and seems like an abuse of lambda expressions. Are you planning on using that in real code or are you just trying to do this as an exercise? _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users

Can I get any help? I need the exact method to finish the program and do not want to give it up half-way. Thanks a lot. 在2009-07-11,"Zachary Turner" <divisortheory@gmail.com> 写道:
2009/7/10 fmingu <fmingu@163.com>:
Do you mean : ?? ( bind(&IIPrimemap::value_type::second,(*bind(static_cast<IIPrimemap::iterator (IIPrimemap::*)()> (&IIPrimemap::end),var(primemapvec))))())++; or: ?bind(&IIPrimemap::value_type::second,(*bind(static_cast<IIPrimemap::iterator (IIPrimemap::*)()> (&IIPrimemap::end),var(primemapvec))))()++; ? but I still can not get the changed value. Can you give me further suggestions? Thanks a lot.
Honestly that code is really hard to read, and seems like an abuse of lambda expressions. Are you planning on using that in real code or are you just trying to do this as an exercise? _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (3)
-
fmingu
-
Steven Watanabe
-
Zachary Turner