Boost logo

Boost Users :

From: klaus triendl (triendl.kj_at_[hidden])
Date: 2006-07-04 21:06:10


Peter Dimov wrote:
> klaus triendl wrote:
>> Peter Dimov wrote:
>> Can I make it smart enough?
>
> I showed you one way. Another would be to use ret<MyStream&> to force a
> specific return type:
>
> http://www.boost.org/doc/html/lambda/le_in_details.html#lambda.overriding_deduced_return_type

Thanks for pointing me in the right direction.
Extending the return type deduction system is the best way for me:

namespace boost
{

   namespace lambda
   {

template<typename T>
class plain_return_type_2<bitwise_action<leftshift_action>, MySubStream, T>
{
public:
   typedef MyStream& type;
};

   }
}

--
Klaus Triendl

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net