2
0
mirror of https://github.com/boostorg/phoenix.git synced 2026-02-21 15:22:10 +00:00

Merge branch 'fix_7730' into develop

This commit is contained in:
John Fletcher
2014-02-04 00:03:05 +00:00
5 changed files with 30 additions and 4 deletions

View File

@@ -26,7 +26,7 @@ TODO (known issues):
(all refer to phoenix though not all may be in fact phoenix bugs
#9291, #9260, #8820, #8800
#8564, #8558, #8504, #8298, #8187, #8156, #7996
#7953, #7946, #7730, #7481, #7480, #7423
#7953, #7946, #7481, #7480, #7423
#7391, #7356, #6911, #6848,
#6202, #6133, #6026, #5687
- Feature requests
@@ -49,6 +49,9 @@ CHANGELOG
- Fixed #8704 Using Phoenix lambdas on top of custom Proto expressions
This works for C++11 only.
Test cmath applies to this.
- Fixed #7730 Generic specializations of is_nullary for custom terminals are not possible
Define BOOST_PHOENIX_SPECIALIZE_CUSTOM_TERMINAL to use this.
Test bug7730 tests this.
- Fixed #7624 Deduction failure
This works for C++11 and has a workaround for C++03
Test bug7624 tests both versions.

View File

@@ -137,12 +137,20 @@ namespace boost { namespace phoenix
struct is_nullary<T const >
: is_nullary<T>
{};
#ifdef BOOST_PHOENIX_SPECIALIZE_CUSTOM_TERMINAL
template <typename T>
struct is_nullary<custom_terminal<T>,
typename custom_terminal<T>::_is_default_custom_terminal >
: mpl::true_
{};
#else
template <typename T>
struct is_nullary<custom_terminal<T> >
: mpl::true_
{};
#endif
template <typename T>
struct is_nullary<custom_terminal<actor<T> > >
: evaluator

View File

@@ -48,7 +48,13 @@ namespace boost { namespace phoenix
: mpl::false_ {};
template <typename T, typename Dummy>
struct custom_terminal;
struct custom_terminal
#ifdef BOOST_PHOENIX_SPECIALIZE_CUSTOM_TERMINAL
{
typedef void _is_default_custom_terminal; // suggested fix for #7730
}
#endif
;
namespace expression
{

View File

@@ -166,6 +166,7 @@ test-suite phoenix_include :
[ run include/core/nothing.cpp ]
[ run include/core/reference.cpp ]
[ run include/core/terminal.cpp ]
[ run include/core/bug7730.cpp ]
[ run include/core/value.cpp ]
[ run include/core/visit_each.cpp ]
[ run include/function/function.cpp : : : : function_function ]

View File

@@ -0,0 +1,8 @@
/*=============================================================================
Copyright (c) 2011 Thomas Heller
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#define BOOST_PHOENIX_SPECIALIZE_CUSTOM_TERMINAL
#include <boost/phoenix/core/terminal.hpp>
int main() {}