Opened 10 years ago
Closed 5 years ago
#6912 closed Bugs (fixed)
[Phoenix V2] Add tr1_result_of specialization
| Reported by: | Michel Morin | Owned by: | Joel de Guzman |
|---|---|---|---|
| Milestone: | To Be Determined | Component: | spirit |
| 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.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
Change History (3)
comment:1 by , 10 years ago
comment:2 by , 5 years ago
Phoenix V2 gone since https://github.com/boostorg/spirit/commit/c0537c8251d04773a24bafdab8363b1cba350d07
comment:3 by , 5 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |

Phoenix V2 is in maintenance mode and is superseded by V3. I don't think it is a good idea to change the code unless it is a real showstopper. Use V3 instead.