Opened 10 years ago

#6909 new Bugs

[Functional/Forward] Add tr1_result_of specialization

Reported by: Michel Morin Owned by: t_schwinger
Milestone: To Be Determined Component: functional/forward
Version: Boost Development Trunk Severity: Problem
Keywords: Cc:

Description

To make result_of and tr1_result_of equivalent, we have to add specialization of tr1_result_of. (Boost.Functional/Forward already has specialization of result_of.)

Also, it would be nice to avoid specialization of result_of, when we use decltype-based result_of. (As for tr1_result_of, it should be specialized even when decltype-based result_of is used.)

So, instead of

template <...>
struct result_of<F()>
{
    typedef XXXX type;
};

we should write

#if !defined(BOOST_RESULT_OF_USE_DECLTYPE) || defined(BOOST_NO_DECLTYPE)
template <...>
struct result_of<F()>
{
    typedef XXXX type;
};
#endif

template <...>
struct tr1_result_of<F()>
{
    typedef XXXX type;
};

A quick grep said the following files specialize result_of.

  • functional/forward_adapter.hpp
  • functional/lightweight_forward_adapter.hpp

Change History (0)

Note: See TracTickets for help on using tickets.