Boost logo

Boost Users :

Subject: Re: [Boost-users] [ptr_container] compiler error with BOOST_RESULT_OF_USE_DECLTYPE
From: Thorsten Ottosen (thorsten.ottosen_at_[hidden])
Date: 2011-03-02 15:30:54


Den 01-03-2011 21:30, Michel MORIN skrev:

> The error occurred in the code (at line 105 of ptr_container/indirect_fun.hpp)
> which determines the return type of unary function call operator of
> class boost::void_ptr_indirect_fun<my_less<int>, int, int>:
>
> result_of<my_less<int>(int&)>::type operator()( const void* r ) const {...}
>
> Since result_of<my_less<int>(...)> only works with two function parameters,
> this code does not compile.
>
>
> These issues, including OP's one, can be fixed by removing unary function call
> operator of class boost::void_ptr_indirect_fun (i.e. making it BinaryFunction).

The problem then is that we can't use the class with unary functions.
Something that might already we be done by users.

-Thorsten


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