From 9fe172886b68746617705163ad3fe63ec4572692 Mon Sep 17 00:00:00 2001 From: John Fletcher Date: Tue, 4 Feb 2014 21:17:17 +0000 Subject: [PATCH 01/13] include/boost/phoenix/core/is_nullary.hpp swapped test to default on. --- include/boost/phoenix/core/is_nullary.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/phoenix/core/is_nullary.hpp b/include/boost/phoenix/core/is_nullary.hpp index f90a043..ef6395a 100644 --- a/include/boost/phoenix/core/is_nullary.hpp +++ b/include/boost/phoenix/core/is_nullary.hpp @@ -138,7 +138,7 @@ namespace boost { namespace phoenix : is_nullary {}; -#ifdef BOOST_PHOENIX_SPECIALIZE_CUSTOM_TERMINAL +#ifndef BOOST_PHOENIX_NO_SPECIALIZE_CUSTOM_TERMINAL template struct is_nullary, typename custom_terminal::_is_default_custom_terminal > From e8832f17031aac0554e17587b1d457af04453f34 Mon Sep 17 00:00:00 2001 From: John Fletcher Date: Tue, 4 Feb 2014 21:17:33 +0000 Subject: [PATCH 02/13] nclude/boost/phoenix/core/terminal.hpp swapped test to default on. --- include/boost/phoenix/core/terminal.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/boost/phoenix/core/terminal.hpp b/include/boost/phoenix/core/terminal.hpp index 726694f..1223f77 100644 --- a/include/boost/phoenix/core/terminal.hpp +++ b/include/boost/phoenix/core/terminal.hpp @@ -49,9 +49,9 @@ namespace boost { namespace phoenix template struct custom_terminal -#ifdef BOOST_PHOENIX_SPECIALIZE_CUSTOM_TERMINAL +#ifndef BOOST_PHOENIX_NO_SPECIALIZE_CUSTOM_TERMINAL { - typedef void _is_default_custom_terminal; // suggested fix for #7730 + typedef void _is_default_custom_terminal; // fix for #7730 } #endif ; From ec5bb34475a35b7de511d230cdf9065c7773eacc Mon Sep 17 00:00:00 2001 From: John Fletcher Date: Tue, 4 Feb 2014 21:18:18 +0000 Subject: [PATCH 03/13] test/include/core/bug7730.cpp switched test as well. --- test/include/core/bug7730.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/include/core/bug7730.cpp b/test/include/core/bug7730.cpp index 7df697c..818f6a0 100644 --- a/test/include/core/bug7730.cpp +++ b/test/include/core/bug7730.cpp @@ -3,6 +3,6 @@ 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 +#define BOOST_PHOENIX_NO_SPECIALIZE_CUSTOM_TERMINAL #include int main() {} From f346f296f4c0edc3d2aa32cb06c984b0c8061c43 Mon Sep 17 00:00:00 2001 From: John Fletcher Date: Tue, 4 Feb 2014 23:36:48 +0000 Subject: [PATCH 04/13] include/boost/phoenix Various experiments to solve #7730 --- include/boost/phoenix/core/is_nullary.hpp | 34 ++++++++++++++++++- include/boost/phoenix/core/nothing.hpp | 4 ++- include/boost/phoenix/core/reference.hpp | 3 ++ include/boost/phoenix/core/value.hpp | 3 ++ .../boost/phoenix/scope/local_variable.hpp | 3 ++ include/boost/phoenix/statement/throw.hpp | 3 ++ 6 files changed, 48 insertions(+), 2 deletions(-) diff --git a/include/boost/phoenix/core/is_nullary.hpp b/include/boost/phoenix/core/is_nullary.hpp index ef6395a..041457a 100644 --- a/include/boost/phoenix/core/is_nullary.hpp +++ b/include/boost/phoenix/core/is_nullary.hpp @@ -17,7 +17,9 @@ #include #include #include - +#ifndef BOOST_PHOENIX_NO_SPECIALIZE_CUSTOM_TERMINAL +//#include +#endif namespace boost { namespace phoenix { namespace result_of @@ -144,6 +146,36 @@ namespace boost { namespace phoenix typename custom_terminal::_is_default_custom_terminal > : mpl::true_ {}; + + template + struct is_nullary, + typename custom_terminal::_is_nothing_custom_terminal > + : mpl::true_ + {}; + + template + struct is_nullary, + typename custom_terminal::_is_throw_custom_terminal > + : mpl::true_ + {}; + + template + struct is_nullary, + typename custom_terminal::_is_local_var_custom_terminal > + : mpl::true_ + {}; + + template + struct is_nullary, + typename custom_terminal::_is_value_custom_terminal > + : mpl::true_ + {}; + + template + struct is_nullary, + typename custom_terminal::_is_reference_custom_terminal > + : mpl::true_ + {}; #else template struct is_nullary > diff --git a/include/boost/phoenix/core/nothing.hpp b/include/boost/phoenix/core/nothing.hpp index c63c43a..8602b8c 100644 --- a/include/boost/phoenix/core/nothing.hpp +++ b/include/boost/phoenix/core/nothing.hpp @@ -45,7 +45,9 @@ namespace boost { namespace phoenix struct custom_terminal { typedef void result_type; - +#ifndef BOOST_PHOENIX_NO_SPECIALIZE_CUSTOM_TERMINAL + typedef void _is_nothing_custom_terminal; // fix for #7730 +#endif template void operator()(detail::nothing, Context &) const { diff --git a/include/boost/phoenix/core/reference.hpp b/include/boost/phoenix/core/reference.hpp index 7f5170a..cc0f942 100644 --- a/include/boost/phoenix/core/reference.hpp +++ b/include/boost/phoenix/core/reference.hpp @@ -90,6 +90,9 @@ namespace boost { namespace phoenix struct custom_terminal > { typedef T &result_type; +#ifndef BOOST_PHOENIX_NO_SPECIALIZE_CUSTOM_TERMINAL + typedef void _is_reference_custom_terminal; // fix for #7730 +#endif template T &operator()(boost::reference_wrapper r, Context &) const diff --git a/include/boost/phoenix/core/value.hpp b/include/boost/phoenix/core/value.hpp index 6c46242..8538d97 100644 --- a/include/boost/phoenix/core/value.hpp +++ b/include/boost/phoenix/core/value.hpp @@ -52,6 +52,9 @@ namespace boost { namespace phoenix { template struct result; +#ifndef BOOST_PHOENIX_NO_SPECIALIZE_CUSTOM_TERMINAL + typedef void _is_value_custom_terminal; // fix for #7730 +#endif template struct result diff --git a/include/boost/phoenix/scope/local_variable.hpp b/include/boost/phoenix/scope/local_variable.hpp index ebc01c3..6cc3ba5 100644 --- a/include/boost/phoenix/scope/local_variable.hpp +++ b/include/boost/phoenix/scope/local_variable.hpp @@ -93,6 +93,9 @@ namespace boost { namespace phoenix { template struct result; +#ifndef BOOST_PHOENIX_NO_SPECIALIZE_CUSTOM_TERMINAL + typedef void _is_local_var_custom_terminal; // fix for #7730 +#endif template struct result diff --git a/include/boost/phoenix/statement/throw.hpp b/include/boost/phoenix/statement/throw.hpp index 373a09b..c743500 100644 --- a/include/boost/phoenix/statement/throw.hpp +++ b/include/boost/phoenix/statement/throw.hpp @@ -90,6 +90,9 @@ namespace boost { namespace phoenix struct custom_terminal { typedef void result_type; +#ifndef BOOST_PHOENIX_NO_SPECIALIZE_CUSTOM_TERMINAL + typedef void _is_throw_custom_terminal; // fix for #7730 +#endif template void operator()(detail::rethrow, Context &) const From 59e8d2ddf54770dd5de2c71cab749bd5d5661f17 Mon Sep 17 00:00:00 2001 From: John Fletcher Date: Tue, 4 Feb 2014 23:37:19 +0000 Subject: [PATCH 05/13] test/include/various Tests to see what is working for #7730 --- test/include/core.cpp | 1 + test/include/core/nothing.cpp | 1 + test/include/statement.cpp | 1 + test/include/statement/throw.cpp | 1 + 4 files changed, 4 insertions(+) diff --git a/test/include/core.cpp b/test/include/core.cpp index a01644b..cb7d797 100644 --- a/test/include/core.cpp +++ b/test/include/core.cpp @@ -3,5 +3,6 @@ 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_NO_SPECIALIZE_CUSTOM_TERMINAL #include int main() {} diff --git a/test/include/core/nothing.cpp b/test/include/core/nothing.cpp index 80256a1..b905a9c 100644 --- a/test/include/core/nothing.cpp +++ b/test/include/core/nothing.cpp @@ -3,5 +3,6 @@ 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_NO_SPECIALIZE_CUSTOM_TERMINAL #include int main() {} diff --git a/test/include/statement.cpp b/test/include/statement.cpp index 2d53e9c..eb2d093 100644 --- a/test/include/statement.cpp +++ b/test/include/statement.cpp @@ -3,5 +3,6 @@ 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_NO_SPECIALIZE_CUSTOM_TERMINAL #include int main() {} diff --git a/test/include/statement/throw.cpp b/test/include/statement/throw.cpp index 08d30e0..5c506fe 100644 --- a/test/include/statement/throw.cpp +++ b/test/include/statement/throw.cpp @@ -3,5 +3,6 @@ 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_NO_SPECIALIZE_CUSTOM_TERMINAL #include int main() {} From 7b3b147066bd9c3d3fd80ba2b2e6f56409e25cb1 Mon Sep 17 00:00:00 2001 From: John Fletcher Date: Wed, 5 Feb 2014 00:22:27 +0000 Subject: [PATCH 06/13] include/boost/phoenix further experiments. --- include/boost/phoenix/core/.#terminal.hpp | 1 + include/boost/phoenix/core/is_nullary.hpp | 2 +- include/boost/phoenix/scope/local_variable.hpp | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) create mode 120000 include/boost/phoenix/core/.#terminal.hpp diff --git a/include/boost/phoenix/core/.#terminal.hpp b/include/boost/phoenix/core/.#terminal.hpp new file mode 120000 index 0000000..d91ec70 --- /dev/null +++ b/include/boost/phoenix/core/.#terminal.hpp @@ -0,0 +1 @@ +fletcher@fletcher-desktop.11588:1391537395 \ No newline at end of file diff --git a/include/boost/phoenix/core/is_nullary.hpp b/include/boost/phoenix/core/is_nullary.hpp index 041457a..f6c2261 100644 --- a/include/boost/phoenix/core/is_nullary.hpp +++ b/include/boost/phoenix/core/is_nullary.hpp @@ -160,7 +160,7 @@ namespace boost { namespace phoenix {}; template - struct is_nullary, + struct is_nullary, typename custom_terminal::_is_local_var_custom_terminal > : mpl::true_ {}; diff --git a/include/boost/phoenix/scope/local_variable.hpp b/include/boost/phoenix/scope/local_variable.hpp index 6cc3ba5..c2b37c7 100644 --- a/include/boost/phoenix/scope/local_variable.hpp +++ b/include/boost/phoenix/scope/local_variable.hpp @@ -88,8 +88,8 @@ namespace boost { namespace phoenix : mpl::true_ {}; - template - struct custom_terminal > + template + struct custom_terminal > { template struct result; From 0bb05804ac5e7ed685f1fe05a1509c689921159f Mon Sep 17 00:00:00 2001 From: John Fletcher Date: Wed, 5 Feb 2014 00:22:49 +0000 Subject: [PATCH 07/13] test/include/scope further test changes. --- test/include/scope/let.cpp | 1 + test/include/scope/local_variable.cpp | 1 + test/include/scope/this.cpp | 1 + 3 files changed, 3 insertions(+) diff --git a/test/include/scope/let.cpp b/test/include/scope/let.cpp index d87102b..d0f6d11 100644 --- a/test/include/scope/let.cpp +++ b/test/include/scope/let.cpp @@ -3,5 +3,6 @@ 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_NO_SPECIALIZE_CUSTOM_TERMINAL #include int main() {} diff --git a/test/include/scope/local_variable.cpp b/test/include/scope/local_variable.cpp index 88df4c1..718f748 100644 --- a/test/include/scope/local_variable.cpp +++ b/test/include/scope/local_variable.cpp @@ -3,5 +3,6 @@ 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_NO_SPECIALIZE_CUSTOM_TERMINAL #include int main() {} diff --git a/test/include/scope/this.cpp b/test/include/scope/this.cpp index 14d7105..95b550c 100644 --- a/test/include/scope/this.cpp +++ b/test/include/scope/this.cpp @@ -3,5 +3,6 @@ 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_NO_SPECIALIZE_CUSTOM_TERMINAL #include int main() {} From 05c9252eab0506d1332cc65e643556787dc51113 Mon Sep 17 00:00:00 2001 From: John Fletcher Date: Thu, 6 Feb 2014 17:44:24 +0000 Subject: [PATCH 08/13] file deleted --- include/boost/phoenix/core/.#terminal.hpp | 1 - 1 file changed, 1 deletion(-) delete mode 120000 include/boost/phoenix/core/.#terminal.hpp diff --git a/include/boost/phoenix/core/.#terminal.hpp b/include/boost/phoenix/core/.#terminal.hpp deleted file mode 120000 index d91ec70..0000000 --- a/include/boost/phoenix/core/.#terminal.hpp +++ /dev/null @@ -1 +0,0 @@ -fletcher@fletcher-desktop.11588:1391537395 \ No newline at end of file From 5bc1ae31b76a2ebb21d65c11ed41555e14b29334 Mon Sep 17 00:00:00 2001 From: John Fletcher Date: Thu, 6 Feb 2014 17:45:18 +0000 Subject: [PATCH 09/13] include/boost/phoenix/core/is_nullary.hpp Local vars need setting of false_ --- include/boost/phoenix/core/is_nullary.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/phoenix/core/is_nullary.hpp b/include/boost/phoenix/core/is_nullary.hpp index f6c2261..8d8234f 100644 --- a/include/boost/phoenix/core/is_nullary.hpp +++ b/include/boost/phoenix/core/is_nullary.hpp @@ -162,7 +162,7 @@ namespace boost { namespace phoenix template struct is_nullary, typename custom_terminal::_is_local_var_custom_terminal > - : mpl::true_ + : mpl::false_ {}; template From 93a2c36edd76f28c9986fc5c8584060ae789994f Mon Sep 17 00:00:00 2001 From: John Fletcher Date: Thu, 6 Feb 2014 19:41:29 +0000 Subject: [PATCH 10/13] test/include/core/bug7730.cpp Test all of phoenix with BOOST_PHOENIX_NO_SPECIALIZE_CUSTOM_TERMINAL defined --- test/include/core/bug7730.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/include/core/bug7730.cpp b/test/include/core/bug7730.cpp index 818f6a0..1baae29 100644 --- a/test/include/core/bug7730.cpp +++ b/test/include/core/bug7730.cpp @@ -4,5 +4,5 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ #define BOOST_PHOENIX_NO_SPECIALIZE_CUSTOM_TERMINAL -#include +#include int main() {} From 5585da6ad1cbbf950686f02ac853c95aacd4f631 Mon Sep 17 00:00:00 2001 From: John Fletcher Date: Thu, 6 Feb 2014 19:42:55 +0000 Subject: [PATCH 11/13] include/boost/phoenix/scope/local_variable.hpp Take out local definition of is_nullary for case when BOOST_PHOENIX_NO_SPECIALISE_CUSTOM_TERMINAL is not defined. --- include/boost/phoenix/scope/local_variable.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/boost/phoenix/scope/local_variable.hpp b/include/boost/phoenix/scope/local_variable.hpp index c2b37c7..3b26c95 100644 --- a/include/boost/phoenix/scope/local_variable.hpp +++ b/include/boost/phoenix/scope/local_variable.hpp @@ -50,6 +50,7 @@ namespace boost { namespace phoenix {}; } +#ifdef BOOST_PHOENIX_NO_SPECIALIZE_CUSTOM_TERMINAL namespace result_of { template @@ -57,6 +58,7 @@ namespace boost { namespace phoenix : mpl::false_ {}; } +#endif namespace detail { From e695ef051a2ab8f4c251ac2b543ed935c375018e Mon Sep 17 00:00:00 2001 From: John Fletcher Date: Thu, 6 Feb 2014 20:11:15 +0000 Subject: [PATCH 12/13] include/boost/phoenix/core/is_nullary.hpp value.hpp Specialization here is wrong. --- include/boost/phoenix/core/is_nullary.hpp | 4 ++-- include/boost/phoenix/core/value.hpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/boost/phoenix/core/is_nullary.hpp b/include/boost/phoenix/core/is_nullary.hpp index 8d8234f..82f9400 100644 --- a/include/boost/phoenix/core/is_nullary.hpp +++ b/include/boost/phoenix/core/is_nullary.hpp @@ -164,13 +164,13 @@ namespace boost { namespace phoenix typename custom_terminal::_is_local_var_custom_terminal > : mpl::false_ {}; - + /* template struct is_nullary, typename custom_terminal::_is_value_custom_terminal > : mpl::true_ {}; - + */ template struct is_nullary, typename custom_terminal::_is_reference_custom_terminal > diff --git a/include/boost/phoenix/core/value.hpp b/include/boost/phoenix/core/value.hpp index 8538d97..f89a71f 100644 --- a/include/boost/phoenix/core/value.hpp +++ b/include/boost/phoenix/core/value.hpp @@ -53,7 +53,7 @@ namespace boost { namespace phoenix template struct result; #ifndef BOOST_PHOENIX_NO_SPECIALIZE_CUSTOM_TERMINAL - typedef void _is_value_custom_terminal; // fix for #7730 + // typedef void _is_value_custom_terminal; // fix for #7730 #endif template From 0ece7c7477e375c230b9a728834cf73a69e4f5ce Mon Sep 17 00:00:00 2001 From: John Fletcher Date: Thu, 6 Feb 2014 23:17:56 +0000 Subject: [PATCH 13/13] include/boost/phoenix/core/is_nullary.hpp value.hpp remove redundant code. --- include/boost/phoenix/core/is_nullary.hpp | 8 +------- include/boost/phoenix/core/value.hpp | 3 --- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/include/boost/phoenix/core/is_nullary.hpp b/include/boost/phoenix/core/is_nullary.hpp index 82f9400..f15f321 100644 --- a/include/boost/phoenix/core/is_nullary.hpp +++ b/include/boost/phoenix/core/is_nullary.hpp @@ -164,13 +164,7 @@ namespace boost { namespace phoenix typename custom_terminal::_is_local_var_custom_terminal > : mpl::false_ {}; - /* - template - struct is_nullary, - typename custom_terminal::_is_value_custom_terminal > - : mpl::true_ - {}; - */ + template struct is_nullary, typename custom_terminal::_is_reference_custom_terminal > diff --git a/include/boost/phoenix/core/value.hpp b/include/boost/phoenix/core/value.hpp index f89a71f..6c46242 100644 --- a/include/boost/phoenix/core/value.hpp +++ b/include/boost/phoenix/core/value.hpp @@ -52,9 +52,6 @@ namespace boost { namespace phoenix { template struct result; -#ifndef BOOST_PHOENIX_NO_SPECIALIZE_CUSTOM_TERMINAL - // typedef void _is_value_custom_terminal; // fix for #7730 -#endif template struct result