On Aug 30, 2005, at 7:25 AM, Pierre viallet wrote: Courier NewI’m just starting to use boost::lambda an boost::lambda::bind, and I do not understand why this do not work whith valarray : Courier New  Courier New  Courier Newnamespace std{ Courier New  Courier Newclass CToto{ Courier Newpublic: Courier New      CToto(double _i): a(_i) {} Courier New      CToto(): a(0.0) {} Courier New      double get() const Courier New            {return a;} Courier Newprivate: Courier New       double a; Courier New}; Courier New  Courier New  Courier Newstd::vector< aTotoPtrVect; Courier NewaTotoPtrVect.push_back(new std::CToto(1.1)); Courier NewaTotoPtrVect.push_back(new std::CToto(2.2)); Courier NewaTotoPtrVect.push_back(new std::CToto(3.3)); Courier NewaTotoPtrVect.push_back(new std::CToto(4.4)); Courier New  Courier Newstd::vector < dv(std::distance((aTotoVect.begin(), aTotoVect.end()); Courier Newstd::for_each(aTotoPtrVect.begin(), aTotoPtrVect.end(), bll::var(dv)[bll::var(uiIdx)++] = bll::bind(&std::CToto::get, bll::_1)); // work fine Courier New  Courier Newstd::valaray < dvv(std::distance((aTotoVect.begin(), aTotoVect.end()); Courier Newstd::for_each(aTotoPtrVect.begin(), aTotoPtrVect.end(), bll::var(dvv)[bll::var(uiIdx)++] = bll::bind(&std::CToto::get, bll::_1)); // do not work Courier New  Probably, because BLL does not know about valarray, and doesn't know what the return type of [] should be. I haven't tested this, but you can try wrapping Courier Newbll::var(dvv)[bll::var(uiIdx)++] with bll::ret as follows : Courier New bll::ret<(bll::var(dvv)[bll::var(uiIdx)++]) Best, Jaakko Järvi Courier NewIs someone could explain me that ?   FFFF,0000,0000Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger 0000,0000,EEEETéléchargez le ici ! _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users