From f11680315d641f21f8f1007c595fd8d25d6b5383 Mon Sep 17 00:00:00 2001 From: John Fletcher Date: Tue, 23 Dec 2014 19:03:09 +0000 Subject: [PATCH 01/19] stl/cmath.hpp Don't use decltype for Intel C++ --- include/boost/phoenix/stl/cmath.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/phoenix/stl/cmath.hpp b/include/boost/phoenix/stl/cmath.hpp index b7e72e5..a43997d 100644 --- a/include/boost/phoenix/stl/cmath.hpp +++ b/include/boost/phoenix/stl/cmath.hpp @@ -16,7 +16,7 @@ namespace boost { -#ifdef BOOST_NO_CXX11_DECLTYPE +#if (defined (BOOST_NO_CXX11_DECLTYPE) || defined (BOOST_INTEL_CXX_VERSION)) #define BOOST_PHOENIX_MATH_FUNCTION(name, n) \ namespace phoenix_impl { \ struct name ## _impl { \ From ee486080884225fee5972ce174b5323164e07f77 Mon Sep 17 00:00:00 2001 From: John Fletcher Date: Tue, 23 Dec 2014 19:23:05 +0000 Subject: [PATCH 02/19] regression/bug7624.cpp Don't use decltype for Intel C++ --- test/regression/bug7624.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/regression/bug7624.cpp b/test/regression/bug7624.cpp index 9eace4b..5f8a2ed 100644 --- a/test/regression/bug7624.cpp +++ b/test/regression/bug7624.cpp @@ -18,7 +18,7 @@ int main() { char X('x'); find(boost::as_literal("fox"), 'x')(); // works -#ifndef BOOST_NO_CXX11_DECLTYPE +#if !(defined (BOOST_NO_CXX11_DECLTYPE) || defined (BOOST_INTEL_CXX_VERSION)) const char *Y = find(boost::as_literal("fox"), arg1)('x'); // works for C++11 #else const char *Y = find(boost::as_literal("fox"), construct(arg1))('x'); // works From ecfae301355542e0dda9f4da2442875dcde1a6f1 Mon Sep 17 00:00:00 2001 From: John Fletcher Date: Wed, 24 Dec 2014 17:08:22 +0000 Subject: [PATCH 03/19] test/regression/bug7624.cpp Don't use decltype for gcc < 4.5 even with C++0x --- test/regression/bug7624.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/regression/bug7624.cpp b/test/regression/bug7624.cpp index 5f8a2ed..fc86e5d 100644 --- a/test/regression/bug7624.cpp +++ b/test/regression/bug7624.cpp @@ -18,7 +18,9 @@ int main() { char X('x'); find(boost::as_literal("fox"), 'x')(); // works -#if !(defined (BOOST_NO_CXX11_DECLTYPE) || defined (BOOST_INTEL_CXX_VERSION)) +#if !(defined (BOOST_NO_CXX11_DECLTYPE) || \ + defined (BOOST_INTEL_CXX_VERSION) || \ + (BOOST_GCC_VERSION < 40500) ) const char *Y = find(boost::as_literal("fox"), arg1)('x'); // works for C++11 #else const char *Y = find(boost::as_literal("fox"), construct(arg1))('x'); // works From 6e21bf742de5e411153a34862f0ab3ccbf66f32d Mon Sep 17 00:00:00 2001 From: John Fletcher Date: Wed, 24 Dec 2014 17:11:43 +0000 Subject: [PATCH 04/19] std/cmath.hpp Don't use decltype version for gcc < 4.5 even with C++0x --- include/boost/phoenix/stl/cmath.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/boost/phoenix/stl/cmath.hpp b/include/boost/phoenix/stl/cmath.hpp index a43997d..3eedeaf 100644 --- a/include/boost/phoenix/stl/cmath.hpp +++ b/include/boost/phoenix/stl/cmath.hpp @@ -16,7 +16,9 @@ namespace boost { -#if (defined (BOOST_NO_CXX11_DECLTYPE) || defined (BOOST_INTEL_CXX_VERSION)) +#if (defined (BOOST_NO_CXX11_DECLTYPE) || \ + defined (BOOST_INTEL_CXX_VERSION) || \ + (BOOST_GCC_VERSION < 40500) )) #define BOOST_PHOENIX_MATH_FUNCTION(name, n) \ namespace phoenix_impl { \ struct name ## _impl { \ From e3ed3afbcc2fc3cbf1f605472da01d77913e2ceb Mon Sep 17 00:00:00 2001 From: John Fletcher Date: Wed, 24 Dec 2014 17:13:58 +0000 Subject: [PATCH 05/19] stl/cmath.hpp Correct typo in previous edit --- include/boost/phoenix/stl/cmath.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/phoenix/stl/cmath.hpp b/include/boost/phoenix/stl/cmath.hpp index 3eedeaf..7db25c4 100644 --- a/include/boost/phoenix/stl/cmath.hpp +++ b/include/boost/phoenix/stl/cmath.hpp @@ -18,7 +18,7 @@ namespace boost { #if (defined (BOOST_NO_CXX11_DECLTYPE) || \ defined (BOOST_INTEL_CXX_VERSION) || \ - (BOOST_GCC_VERSION < 40500) )) + (BOOST_GCC_VERSION < 40500) ) #define BOOST_PHOENIX_MATH_FUNCTION(name, n) \ namespace phoenix_impl { \ struct name ## _impl { \ From 2c8cff4c42e2427f8d583942aeee920851a26ed8 Mon Sep 17 00:00:00 2001 From: John Fletcher Date: Wed, 24 Dec 2014 17:50:23 +0000 Subject: [PATCH 06/19] test/regression/bug4853.cpp Remove value test for gcc < 4.5 --- test/regression/bug4853.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/regression/bug4853.cpp b/test/regression/bug4853.cpp index a4c8f75..34b6f08 100644 --- a/test/regression/bug4853.cpp +++ b/test/regression/bug4853.cpp @@ -55,12 +55,14 @@ int range_test_complex() { for(unsigned i = 0; i < result1.size(); ++i) std::cout << result1[i] << "\n"; - + +#if !(BOOST_GCC_VERSION < 40500) boost::push_back(result2, source | transformed(phoenix::bind(&Foo::value_, *arg1)) | uniqued); for(unsigned i = 0; i < result2.size(); ++i) std::cout << result2[i] << "\n"; - +#endif + return 0; } From 21f9c361a2188afe9bc2aa4cd556e22ea62da318 Mon Sep 17 00:00:00 2001 From: John Fletcher Date: Wed, 24 Dec 2014 22:44:27 +0000 Subject: [PATCH 07/19] Add lazy_enable_if to zero argument code. --- include/boost/phoenix/bind/bind_member_function.hpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/include/boost/phoenix/bind/bind_member_function.hpp b/include/boost/phoenix/bind/bind_member_function.hpp index edc10dc..36cfeec 100644 --- a/include/boost/phoenix/bind/bind_member_function.hpp +++ b/include/boost/phoenix/bind/bind_member_function.hpp @@ -1,7 +1,8 @@ /*============================================================================= Copyright (c) 2001-2007 Joel de Guzman + Copyright (c) 2014 John Fletcher - Distributed under the Boost Software License, Version 1.0. (See accompanying + 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) ==============================================================================*/ @@ -10,6 +11,7 @@ #ifndef PHOENIX_BIND_BIND_MEMBER_FUNCTION_HPP #define PHOENIX_BIND_BIND_MEMBER_FUNCTION_HPP +#include #include #include #include @@ -20,9 +22,11 @@ namespace boost { namespace phoenix template inline + typename boost::lazy_enable_if< + boost::is_member_function_pointer, typename detail::expression::function_eval< detail::member_function_ptr<0, RT, RT(ClassT::*)()> - , ClassA + , ClassA > >::type const bind(RT(ClassT::*f)(), ClassA const& obj) { @@ -36,9 +40,11 @@ namespace boost { namespace phoenix template inline + typename boost::lazy_enable_if< + boost::is_member_function_pointer, typename detail::expression::function_eval< detail::member_function_ptr<0, RT, RT(ClassT::*)() const> - , ClassA + , ClassA > >::type const bind(RT(ClassT::*f)() const, ClassA const& obj) { From b76a28c7b53edd2e249c6ba0bdd0ca6347236ab6 Mon Sep 17 00:00:00 2001 From: John Fletcher Date: Thu, 25 Dec 2014 18:05:11 +0000 Subject: [PATCH 08/19] Changelog Update for bind/bind_member_function.hpp changes --- ChangeLog | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ChangeLog b/ChangeLog index c318dfa..6347192 100644 --- a/ChangeLog +++ b/ChangeLog @@ -54,6 +54,8 @@ CHANGELOG This involves use of boost::lazy_disable_if to resolve the choice of overloaded bind functions in bind/bind_member_variable.hpp + bind/bind_member_function.hpp Add reverse test boost::lazy_enable_if + This resolves a smaller number of failures. - #9742 New tests for_each and for_test to attempt to resolve this. - V3.0.6 From 31427ea93fb8b1912ad84738b6b9052945cb47e6 Mon Sep 17 00:00:00 2001 From: John Fletcher Date: Fri, 26 Dec 2014 12:29:32 +0000 Subject: [PATCH 09/19] stdlib/cmath.cpp Make explicit use of boost::phoenix::fabs --- test/stdlib/cmath.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/stdlib/cmath.cpp b/test/stdlib/cmath.cpp index aa1e798..95f4a8a 100644 --- a/test/stdlib/cmath.cpp +++ b/test/stdlib/cmath.cpp @@ -1,5 +1,6 @@ /*============================================================================= Copyright (c) 2001-2007 Joel de Guzman + Copyright (c) 2014 John Fletcher 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) @@ -16,7 +17,7 @@ int main() { double eps = 0.000001; using namespace boost::phoenix::arg_names; - boost::function f = fabs(_1 - _2) < eps; + boost::function f = boost::phoenix::fabs(_1 - _2) < eps; double x = boost::phoenix::pow(_1,_2)(2.,2.); double y = boost::phoenix::atan2(_1,_2)(1.,1.); From f3f6113743150b54cd1178e08cc94140901de823 Mon Sep 17 00:00:00 2001 From: John Fletcher Date: Fri, 26 Dec 2014 17:10:16 +0000 Subject: [PATCH 10/19] Take out vector > test to for MSVC 12 and 14 --- test/scope/lambda_tests.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/scope/lambda_tests.cpp b/test/scope/lambda_tests.cpp index ef28ba0..60306c6 100644 --- a/test/scope/lambda_tests.cpp +++ b/test/scope/lambda_tests.cpp @@ -1,5 +1,6 @@ /*============================================================================= Copyright (c) 2001-2007 Joel de Guzman + Copyright (c) 2014 John Fletcher 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) @@ -161,14 +162,15 @@ main() using boost::phoenix::for_each; using boost::phoenix::push_back; +#if (!defined(BOOST_MSVC) || (BOOST_MSVC < 1700)) int x = 10; std::vector > v(10); - for_each(_1, lambda(_a = _2)[push_back(_1, _a)])(v, x); int y = 0; for_each(arg1, lambda[ref(y) += _1[0]])(v); BOOST_TEST(y == 100); +#endif } { From 3819efef8c904e71ac8b7c16c4652f4251c6b118 Mon Sep 17 00:00:00 2001 From: John Fletcher Date: Fri, 26 Dec 2014 22:58:52 +0000 Subject: [PATCH 11/19] Remove failing test for MSVC > 12 --- test/algorithm/querying.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/algorithm/querying.cpp b/test/algorithm/querying.cpp index 5d1072d..2cb8ec0 100644 --- a/test/algorithm/querying.cpp +++ b/test/algorithm/querying.cpp @@ -59,8 +59,10 @@ namespace std::set s(array, array + 3); BOOST_TEST(boost::phoenix::find(arg1, 2)(s) == s.find(2)); +#if (defined(BOOST_MSVC) && (BOOST_MSVC >= 1700)) std::map m = boost::assign::map_list_of(0, 1)(2, 3)(4, 5); BOOST_TEST(boost::phoenix::find(arg1, 2)(m) == m.find(2)); +#endif #ifdef BOOST_PHOENIX_HAS_HASH From 5ea72ea7c2b83ea7ca69c5b2d8c53f0ef7fb966a Mon Sep 17 00:00:00 2001 From: John Fletcher Date: Fri, 26 Dec 2014 23:00:31 +0000 Subject: [PATCH 12/19] Correct test - it was the wrong way round --- test/algorithm/querying.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/algorithm/querying.cpp b/test/algorithm/querying.cpp index 2cb8ec0..c98c1f9 100644 --- a/test/algorithm/querying.cpp +++ b/test/algorithm/querying.cpp @@ -59,7 +59,7 @@ namespace std::set s(array, array + 3); BOOST_TEST(boost::phoenix::find(arg1, 2)(s) == s.find(2)); -#if (defined(BOOST_MSVC) && (BOOST_MSVC >= 1700)) +#if !(defined(BOOST_MSVC) && (BOOST_MSVC >= 1700)) std::map m = boost::assign::map_list_of(0, 1)(2, 3)(4, 5); BOOST_TEST(boost::phoenix::find(arg1, 2)(m) == m.find(2)); #endif From 8d139721c2236ebcf09676a5c6b1c114abb58640 Mon Sep 17 00:00:00 2001 From: John Fletcher Date: Fri, 26 Dec 2014 23:19:03 +0000 Subject: [PATCH 13/19] Take out ref(i) = ref(i) test for MSVC > 12 --- test/operator/misc_binary_tests.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/operator/misc_binary_tests.cpp b/test/operator/misc_binary_tests.cpp index 0782816..3457b50 100644 --- a/test/operator/misc_binary_tests.cpp +++ b/test/operator/misc_binary_tests.cpp @@ -26,7 +26,9 @@ main() const char* world = " world"; +#if !(defined(BOOST_MSVC) && (BOOST_MSVC >= 1700)) BOOST_TEST((ref(i) = ref(i))() == 5); +#endif BOOST_TEST((ref(i) = 3)() == 3); BOOST_TEST(i == 3); i = 5; From dc7563497dd16f6a52e60833b8f578086b958b2c Mon Sep 17 00:00:00 2001 From: John Fletcher Date: Sat, 27 Dec 2014 11:24:03 +0000 Subject: [PATCH 14/19] Take out both vector tests and change test to < 1800 --- test/scope/lambda_tests.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/scope/lambda_tests.cpp b/test/scope/lambda_tests.cpp index 60306c6..fb42dbc 100644 --- a/test/scope/lambda_tests.cpp +++ b/test/scope/lambda_tests.cpp @@ -149,20 +149,21 @@ main() { using boost::phoenix::for_each; - +#if (!defined(BOOST_MSVC) || (BOOST_MSVC < 1800)) int init[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }; std::vector v(init, init+10); int x = 0; for_each(_1, lambda(_a = _2)[_a += _1])(v, x); BOOST_TEST(x == 55); +#endif } { using boost::phoenix::for_each; using boost::phoenix::push_back; -#if (!defined(BOOST_MSVC) || (BOOST_MSVC < 1700)) +#if (!defined(BOOST_MSVC) || (BOOST_MSVC < 1800)) int x = 10; std::vector > v(10); for_each(_1, lambda(_a = _2)[push_back(_1, _a)])(v, x); From 8bbc816dbf8e2f41be2d6851877fc1a88c95623e Mon Sep 17 00:00:00 2001 From: John Fletcher Date: Sat, 27 Dec 2014 11:40:25 +0000 Subject: [PATCH 15/19] Updated tests to >= 1900 (MSVC > 12) --- test/algorithm/querying.cpp | 2 +- test/operator/misc_binary_tests.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/algorithm/querying.cpp b/test/algorithm/querying.cpp index c98c1f9..0e3f99e 100644 --- a/test/algorithm/querying.cpp +++ b/test/algorithm/querying.cpp @@ -59,7 +59,7 @@ namespace std::set s(array, array + 3); BOOST_TEST(boost::phoenix::find(arg1, 2)(s) == s.find(2)); -#if !(defined(BOOST_MSVC) && (BOOST_MSVC >= 1700)) +#if !(defined(BOOST_MSVC) && (BOOST_MSVC >= 1900)) std::map m = boost::assign::map_list_of(0, 1)(2, 3)(4, 5); BOOST_TEST(boost::phoenix::find(arg1, 2)(m) == m.find(2)); #endif diff --git a/test/operator/misc_binary_tests.cpp b/test/operator/misc_binary_tests.cpp index 3457b50..468fed2 100644 --- a/test/operator/misc_binary_tests.cpp +++ b/test/operator/misc_binary_tests.cpp @@ -26,7 +26,7 @@ main() const char* world = " world"; -#if !(defined(BOOST_MSVC) && (BOOST_MSVC >= 1700)) +#if !(defined(BOOST_MSVC) && (BOOST_MSVC >= 1900)) BOOST_TEST((ref(i) = ref(i))() == 5); #endif BOOST_TEST((ref(i) = 3)() == 3); From 72efaaa6d0f6b64f7eafacee822d626b28de4004 Mon Sep 17 00:00:00 2001 From: John Fletcher Date: Sat, 27 Dec 2014 17:06:31 +0000 Subject: [PATCH 16/19] doc/phoenix3/qbk Update version to 3.1.0 and quickbook to 1.6 with compatibility to 1.3 --- doc/phoenix3.qbk | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/phoenix3.qbk b/doc/phoenix3.qbk index 3593176..09e7021 100644 --- a/doc/phoenix3.qbk +++ b/doc/phoenix3.qbk @@ -1,6 +1,7 @@ [library Phoenix - [quickbook 1.3] - [version 3.0.5] + [quickbook 1.6] + [compatibility-mode 1.3] + [version 3.1.0] [authors [de Guzman, Joel], [Marsden, Dan], [Heller, Thomas], [Fletcher, John] ] [copyright 2002 2003 2004 2005 2010 2014 Joel de Guzman, Dan Marsden, Thomas Heller, John Fletcher] [category string-text] From b2c55e2093b6a3ea988bff6156e98d2d641cdbf7 Mon Sep 17 00:00:00 2001 From: John Fletcher Date: Sat, 27 Dec 2014 17:22:05 +0000 Subject: [PATCH 17/19] doc/inside/actor.qbk Correct error in reference --- doc/inside/actor.qbk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/inside/actor.qbk b/doc/inside/actor.qbk index a391f5b..d0c59e9 100644 --- a/doc/inside/actor.qbk +++ b/doc/inside/actor.qbk @@ -71,7 +71,7 @@ Additionally, there exist function call operators accepting permutations of cons and non-const references. These operators are created for all N <= `BOOST_PHOENIX_PERFECT_FORWARD_LIMIT` (which defaults to 3). -[def [$http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2002/n1385.htm] +[def $http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2002/n1385.htm] [note *Forwarding Function Problem* From 2b66b29e862df3a34e0f6cd6a81fc1517eec084f Mon Sep 17 00:00:00 2001 From: John Fletcher Date: Sat, 27 Dec 2014 17:41:53 +0000 Subject: [PATCH 18/19] doc/phoenix3.qbk Add a comment on current date. --- doc/phoenix3.qbk | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/phoenix3.qbk b/doc/phoenix3.qbk index 09e7021..78f9356 100644 --- a/doc/phoenix3.qbk +++ b/doc/phoenix3.qbk @@ -18,6 +18,7 @@ [/ September 2005] [/ June 2010] [/ February 2014] +[/ December 2014] [/ Some links] From c848d720bd4220dd81e8671595d8b99e6d8959ae Mon Sep 17 00:00:00 2001 From: John Fletcher Date: Sat, 27 Dec 2014 17:43:18 +0000 Subject: [PATCH 19/19] doc/what_s_new.qbk Add new sections for 3.0.6 and 3.1.0 --- doc/what_s_new.qbk | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/doc/what_s_new.qbk b/doc/what_s_new.qbk index 98d1f86..d88248a 100644 --- a/doc/what_s_new.qbk +++ b/doc/what_s_new.qbk @@ -9,19 +9,34 @@ [section What's New] -[section Phoenix 3.0.5] +[section Phoenix 3.1.0] This is the latest in a series of updates to Phoenix to fix some bugs and to extend the examples. Details of the changes will be found in the __changelog__ and the release number will be increased for each set of changes released. +* A start is being made on updating the documentation. +* A bug has been fixed which was causing a lot of test examples of *bind* to fail. This was particularly the case with more recent compilers which are stricter. +* TODO + There is still a lot of work to be done on fixes, documentation and examples. + +[endsect] + +[section Phoenix 3.0.6 (Boost 1.57.0)] + +* Fixed bug in example/container_actor.cpp in end() function. +* Fixed bug4853 and 5626 - added header for std::forward. +* Fixed bug4853 - added header for gcc 4.9 test + +[endsect] + +[section Phoenix 3.0.5] + * Introduction of __changelog__ and release number increments. * Added BOOST_PHOENIX_VERSION_NUMBER using boost/predef style. * Fixes to bugs #5714 and #5824 are particularly important as they fixed silent errors in the processing of some compound expressions with commas. *This could cause output from some user codes to change unexpectedly.* -* TODO - There is still a lot of work to be done on fixes, documentation and examples. [endsect]