Boost logo

Boost Users :

From: Matthias Kaeppler (nospam_at_[hidden])
Date: 2005-03-04 15:37:35


Ian McCulloch wrote:
>> class indirecter_unary
>>: public std::unary_function< typename
>>boost::unary_traits<Operation>::argument_type*,
>>typename boost::unary_traits<Operation>::result_type >
>
>
> That will still cause problems with pointers to references.

That is one point where I wasn't yet sure (the compiler also complained
about it):
Why is it illegal to have pointers to references at all?

>
> There is still a subtle problem here with what the argument_type should be
> when Operator takes is argument by value. indirecter_unary should then
> have an argument_type that is a pointer to const. One way to achieve that
> would be to use remove_reference<add_const<arg_type>::type>::type* as the
> argument_type.

Are those two function templates also defined in call_traits.hpp? I
can't find them in the library docs.

-- 
Matthias Kaeppler

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