From: shunsuke (pstade.mb_at_[hidden])
Date: 2007-12-22 03:03:54


Tobias Schwinger wrote:
>> Is there any difference to lambda::constructor/new_ptr?
>
> Yes, those components are designed to only work with the Lambda library.
> Functional/Factory OTOH provides standard compliant (they work with
> result_of and the libraries built upon it) function objects.

BTW, Boost.Lambda can support result_of without modifying its source code.

#include <boost/lambda/result_of.hpp> // imaginary header for now.
namespace bl = boost::lambda;

     // result_of conforming FunctionObject
     bl::bind(
         bl::constructor< boost::shared_ptr<int> >(),
         bl::bind(bl::new_ptr<int>(), bl::_1)
     )

If interested, I think I can upload result_of.hpp.

Regards,

-- 
Shunsuke Sogame