[Boost-bugs] [Boost C++ Libraries] #6912: [Phoenix V2] Add tr1_result_of specialization

Subject: [Boost-bugs] [Boost C++ Libraries] #6912: [Phoenix V2] Add tr1_result_of specialization
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-05-17 15:01:45


#6912: [Phoenix V2] Add tr1_result_of specialization
-------------------------------------+--------------------------------------
 Reporter: michel | Owner: djowel
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: spirit
  Version: Boost Development Trunk | Severity: Problem
 Keywords: |
-------------------------------------+--------------------------------------
 To make `result_of` and `tr1_result_of` equivalent, we have to add
 specialization of `tr1_result_of`.
 (Boost.Phoenix V2 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 file specializes `result_of`.
 * spirit/home/phoenix/core/actor.hpp

 Here is a related ticket of Boost.Phoenix V3: #6911

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/6912>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:09 UTC