From 7924230920572b4e9bdcd46ffa52692215c7008c Mon Sep 17 00:00:00 2001 From: John Fletcher Date: Fri, 24 Jan 2014 12:20:43 +0000 Subject: [PATCH 01/12] include/boost/phoenix/core/value.hpp remove tabs --- include/boost/phoenix/core/value.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/boost/phoenix/core/value.hpp b/include/boost/phoenix/core/value.hpp index 5ffa98d..6c46242 100644 --- a/include/boost/phoenix/core/value.hpp +++ b/include/boost/phoenix/core/value.hpp @@ -56,11 +56,11 @@ namespace boost { namespace phoenix template struct result : boost::remove_const< - typename boost::remove_reference< + typename boost::remove_reference< typename evaluator::impl::result_type - >::type - > - {}; + >::type + > + {}; template typename result const &, Context &)>::type From 71ed60768888c994d78a87ef06d8478d0ece4788 Mon Sep 17 00:00:00 2001 From: John Fletcher Date: Fri, 24 Jan 2014 12:27:19 +0000 Subject: [PATCH 02/12] include/boost/phoenix/scope/lambda remove tabs --- include/boost/phoenix/scope/lambda.hpp | 34 +++++++++++++------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/include/boost/phoenix/scope/lambda.hpp b/include/boost/phoenix/scope/lambda.hpp index 432edd9..0162fe7 100644 --- a/include/boost/phoenix/scope/lambda.hpp +++ b/include/boost/phoenix/scope/lambda.hpp @@ -96,22 +96,22 @@ namespace boost { namespace phoenix >::type env_type; - typedef - typename result_of::eval< - Lambda - , typename result_of::context< - scoped_environment< - env_type - , outer_env_type - , locals_type - , map_type - > - , typename result_of::actions< - Context - >::type - >::type - >::type - type; + typedef + typename result_of::eval< + Lambda + , typename result_of::context< + scoped_environment< + env_type + , outer_env_type + , locals_type + , map_type + > + , typename result_of::actions< + Context + >::type + >::type + >::type + type; }; template @@ -148,7 +148,7 @@ namespace boost { namespace phoenix >::type env_type; - scoped_environment< + scoped_environment< env_type , outer_env_type , locals_type From 26b1d87cd48d6fad667d3b403831571332e6b508 Mon Sep 17 00:00:00 2001 From: John Fletcher Date: Fri, 24 Jan 2014 12:53:58 +0000 Subject: [PATCH 03/12] Removed tabs from files --- .../phoenix/scope/scoped_environment.hpp | 8 +- include/boost/phoenix/scope/this.hpp | 190 +++++++++--------- 2 files changed, 99 insertions(+), 99 deletions(-) diff --git a/include/boost/phoenix/scope/scoped_environment.hpp b/include/boost/phoenix/scope/scoped_environment.hpp index a53b4e5..94e5bd3 100644 --- a/include/boost/phoenix/scope/scoped_environment.hpp +++ b/include/boost/phoenix/scope/scoped_environment.hpp @@ -44,11 +44,11 @@ namespace boost { namespace phoenix , locals(locals) {} - scoped_environment(scoped_environment const & o) - : env(o.env) + scoped_environment(scoped_environment const & o) + : env(o.env) , outer_env(o.outer_env) - , locals(o.locals) - {}; + , locals(o.locals) + {}; Env const & env; OuterEnv const & outer_env; diff --git a/include/boost/phoenix/scope/this.hpp b/include/boost/phoenix/scope/this.hpp index de50e80..ebc0888 100644 --- a/include/boost/phoenix/scope/this.hpp +++ b/include/boost/phoenix/scope/this.hpp @@ -62,56 +62,56 @@ namespace boost { namespace phoenix { template struct result { - typedef - typename proto::detail::uncvref< - typename result_of::env< - Context - >::type - >::type - outer_env_type; - - typedef - typename remove_pointer< - typename remove_reference< - typename fusion::result_of::at_c< - outer_env_type - , 0 - >::type - >::type - >::type - actor_type; - - typedef - typename result_of::eval< - A0 const & - , Context const & - >::type - a0_type; + typedef + typename proto::detail::uncvref< + typename result_of::env< + Context + >::type + >::type + outer_env_type; - typedef - vector2 - inner_env_type; + typedef + typename remove_pointer< + typename remove_reference< + typename fusion::result_of::at_c< + outer_env_type + , 0 + >::type + >::type + >::type + actor_type; - typedef - scoped_environment< - inner_env_type - , outer_env_type - , vector0<> - , detail::map_local_index_to_tuple<> - > - env_type; - - typedef - typename result_of::eval< - actor_type const & - , typename result_of::context< - inner_env_type - , typename result_of::actions< - Context - >::type - >::type - >::type - type; + typedef + typename result_of::eval< + A0 const & + , Context const & + >::type + a0_type; + + typedef + vector2 + inner_env_type; + + typedef + scoped_environment< + inner_env_type + , outer_env_type + , vector0<> + , detail::map_local_index_to_tuple<> + > + env_type; + + typedef + typename result_of::eval< + actor_type const & + , typename result_of::context< + inner_env_type + , typename result_of::actions< + Context + >::type + >::type + >::type + type; }; template @@ -121,50 +121,50 @@ namespace boost { namespace phoenix { //std::cout << typeid(checker).name() << "\n"; //std::cout << typeid(checker).name() << "\n"; - typedef - typename proto::detail::uncvref< - typename result_of::env< - Context - >::type - >::type - outer_env_type; - - typedef - typename remove_pointer< - typename remove_reference< - typename fusion::result_of::at_c< - outer_env_type - , 0 - >::type - >::type - >::type - actor_type; - - typedef - typename result_of::eval< - A0 const & - , Context const & - >::type - a0_type; + typedef + typename proto::detail::uncvref< + typename result_of::env< + Context + >::type + >::type + outer_env_type; - typedef - vector2 - inner_env_type; + typedef + typename remove_pointer< + typename remove_reference< + typename fusion::result_of::at_c< + outer_env_type + , 0 + >::type + >::type + >::type + actor_type; - typedef - scoped_environment< - inner_env_type - , outer_env_type - , vector0<> - , detail::map_local_index_to_tuple<> - > - env_type; + typedef + typename result_of::eval< + A0 const & + , Context const & + >::type + a0_type; - inner_env_type inner_env = {fusion::at_c<0>(phoenix::env(ctx)), phoenix::eval(a0, ctx)}; - vector0<> locals; - env_type env(inner_env, phoenix::env(ctx), locals); + typedef + vector2 + inner_env_type; - return phoenix::eval(*fusion::at_c<0>(phoenix::env(ctx)), phoenix::context(inner_env, phoenix::actions(ctx))); + typedef + scoped_environment< + inner_env_type + , outer_env_type + , vector0<> + , detail::map_local_index_to_tuple<> + > + env_type; + + inner_env_type inner_env = {fusion::at_c<0>(phoenix::env(ctx)), phoenix::eval(a0, ctx)}; + vector0<> locals; + env_type env(inner_env, phoenix::env(ctx), locals); + + return phoenix::eval(*fusion::at_c<0>(phoenix::env(ctx)), phoenix::context(inner_env, phoenix::actions(ctx))); //return (*fusion::at_c<0>(phoenix::env(ctx)))(eval(a0, ctx)); } }; @@ -174,17 +174,17 @@ namespace boost { namespace phoenix { : call {}; - template + template struct is_nullary::when : proto::make {}; - template - typename expression::this_::type const - this_(A0 const & a0) - { - return expression::this_::make(a0); - } + template + typename expression::this_::type const + this_(A0 const & a0) + { + return expression::this_::make(a0); + } }} From f61a013cb80c5905de3e328a381e0a6e8babf582 Mon Sep 17 00:00:00 2001 From: John Fletcher Date: Fri, 24 Jan 2014 13:05:32 +0000 Subject: [PATCH 04/12] Licences and tabs in example files --- example/generator.cpp | 2 +- example/generator2.cpp | 46 +++++++++++++++++++--------------- example/identity_transform.cpp | 6 +++++ example/parallel_for.cpp | 6 +++++ 4 files changed, 39 insertions(+), 21 deletions(-) diff --git a/example/generator.cpp b/example/generator.cpp index 60e3d27..e312068 100644 --- a/example/generator.cpp +++ b/example/generator.cpp @@ -1,7 +1,7 @@ /*============================================================================= Copyright (c) 2011 Thomas Heller - 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) ==============================================================================*/ diff --git a/example/generator2.cpp b/example/generator2.cpp index 3691351..aef2f98 100644 --- a/example/generator2.cpp +++ b/example/generator2.cpp @@ -1,3 +1,9 @@ +/*============================================================================= + 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) +==============================================================================*/ #include #include @@ -7,26 +13,26 @@ int main() { - using boost::phoenix::lambda; - using boost::phoenix::let; - using boost::phoenix::ref; - using boost::phoenix::construct; - using boost::phoenix::local_names::_a; - using boost::phoenix::arg_names::_1; + using boost::phoenix::lambda; + using boost::phoenix::let; + using boost::phoenix::ref; + using boost::phoenix::construct; + using boost::phoenix::local_names::_a; + using boost::phoenix::arg_names::_1; - BOOST_AUTO( - generator - , (lambda - ( - _a = val(_1) - ) - [ - std::cout << _a << " " - , _a++ - ]) - ); + BOOST_AUTO( + generator + , (lambda + ( + _a = val(_1) + ) + [ + std::cout << _a << " " + , _a++ + ] ) + ); - int i = 0; - std::vector v(10); - std::for_each(v.begin(), v.end(), generator(0)); + int i = 0; + std::vector v(10); + std::for_each(v.begin(), v.end(), generator(0)); } diff --git a/example/identity_transform.cpp b/example/identity_transform.cpp index 2950dec..471bec0 100644 --- a/example/identity_transform.cpp +++ b/example/identity_transform.cpp @@ -1,3 +1,9 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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) +==============================================================================*/ #include diff --git a/example/parallel_for.cpp b/example/parallel_for.cpp index e021df0..1fc11d1 100644 --- a/example/parallel_for.cpp +++ b/example/parallel_for.cpp @@ -1,3 +1,9 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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) +==============================================================================*/ #include From d9bd12e239bf06a324f25e8a550f54e92aff881f Mon Sep 17 00:00:00 2001 From: John Fletcher Date: Fri, 24 Jan 2014 13:17:05 +0000 Subject: [PATCH 05/12] delete empty file test/include/bind/bind.cpp --- test/include/bind/bind.cpp | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 test/include/bind/bind.cpp diff --git a/test/include/bind/bind.cpp b/test/include/bind/bind.cpp deleted file mode 100644 index e69de29..0000000 From 4bf78093303ca7069f068f73f0be51e5d41b7ec7 Mon Sep 17 00:00:00 2001 From: John Fletcher Date: Fri, 24 Jan 2014 13:17:33 +0000 Subject: [PATCH 06/12] test/bind/bug5782.cpp Add copyright --- test/bind/bug5782.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/bind/bug5782.cpp b/test/bind/bug5782.cpp index e07b526..37b38c9 100644 --- a/test/bind/bug5782.cpp +++ b/test/bind/bug5782.cpp @@ -1,3 +1,9 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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) +==============================================================================*/ #include #include From 64a02259ef71407e0ebc832781e3e094e4ff2083 Mon Sep 17 00:00:00 2001 From: John Fletcher Date: Fri, 24 Jan 2014 13:17:59 +0000 Subject: [PATCH 07/12] test/Jamfile add two include/bind tests --- test/Jamfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/Jamfile b/test/Jamfile index 95fb322..8bc973b 100644 --- a/test/Jamfile +++ b/test/Jamfile @@ -140,6 +140,8 @@ test-suite phoenix_include : [ run include/statement.cpp ] [ run include/stl.cpp ] [ run include/version.cpp ] + [ run include/bind/bind_member_function.cpp] + [ run include/bind/bind_member_variable.cpp] [ run include/core/actor.cpp ] [ run include/core/argument.cpp ] [ run include/core/arity.cpp ] From 66377a9761a59999269ed7f4f00fcf8ba21a34a4 Mon Sep 17 00:00:00 2001 From: John Fletcher Date: Fri, 24 Jan 2014 13:24:53 +0000 Subject: [PATCH 08/12] Delete empty files --- test/include/core/test.cpp | 0 test/include/operator/operator.cpp | 0 2 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 test/include/core/test.cpp delete mode 100644 test/include/operator/operator.cpp diff --git a/test/include/core/test.cpp b/test/include/core/test.cpp deleted file mode 100644 index e69de29..0000000 diff --git a/test/include/operator/operator.cpp b/test/include/operator/operator.cpp deleted file mode 100644 index e69de29..0000000 From e828a7fc5c9cb535870ede99d96fc11b40ea6b0f Mon Sep 17 00:00:00 2001 From: John Fletcher Date: Fri, 24 Jan 2014 13:25:13 +0000 Subject: [PATCH 09/12] test/Jamfile Sort out order in file --- test/Jamfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/Jamfile b/test/Jamfile index 8bc973b..61b769e 100644 --- a/test/Jamfile +++ b/test/Jamfile @@ -151,13 +151,13 @@ test-suite phoenix_include : [ run include/core/function_equal.cpp ] [ run include/core/is_actor.cpp ] [ run include/core/is_nullary.cpp ] - [ run include/core/nothing.cpp ] - [ run include/core/meta_grammar.cpp ] [ run include/core/limits.cpp ] + [ run include/core/meta_grammar.cpp ] + [ run include/core/nothing.cpp ] + [ run include/core/reference.cpp ] [ run include/core/terminal.cpp ] [ run include/core/value.cpp ] [ run include/core/visit_each.cpp ] - [ run include/core/reference.cpp ] [ run include/function/function.cpp : : : : function_function ] [ run include/fusion/at.cpp ] [ run include/object/const_cast.cpp ] From 8ace2fa27a94d4e6a57cadf0f4a2374ca69bb038 Mon Sep 17 00:00:00 2001 From: John Fletcher Date: Fri, 24 Jan 2014 13:25:33 +0000 Subject: [PATCH 10/12] Copyright in bug files --- test/regression/bug5626.cpp | 7 +++++++ test/regression/bug5968.cpp | 7 +++++++ test/regression/bug6040.cpp | 8 ++++++++ 3 files changed, 22 insertions(+) diff --git a/test/regression/bug5626.cpp b/test/regression/bug5626.cpp index 2a6d39e..83d731b 100644 --- a/test/regression/bug5626.cpp +++ b/test/regression/bug5626.cpp @@ -1,3 +1,10 @@ +/*============================================================================== + Copyright (c) 2005-2010 Joel de Guzman + Copyright (c) 2010 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) +==============================================================================*/ #include #include diff --git a/test/regression/bug5968.cpp b/test/regression/bug5968.cpp index 403c945..113360a 100644 --- a/test/regression/bug5968.cpp +++ b/test/regression/bug5968.cpp @@ -1,3 +1,10 @@ +/*============================================================================== + Copyright (c) 2005-2010 Joel de Guzman + Copyright (c) 2010 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) +==============================================================================*/ #include #include diff --git a/test/regression/bug6040.cpp b/test/regression/bug6040.cpp index 041dea3..dce413c 100644 --- a/test/regression/bug6040.cpp +++ b/test/regression/bug6040.cpp @@ -1,3 +1,11 @@ +/*============================================================================== + Copyright (c) 2005-2010 Joel de Guzman + Copyright (c) 2010 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) +==============================================================================*/ + #include #include #include From 22d4dfb8434d98827828c5d2c438fc1e715dd433 Mon Sep 17 00:00:00 2001 From: John Fletcher Date: Fri, 24 Jan 2014 14:17:46 +0000 Subject: [PATCH 11/12] Tabs taken out of test files. --- test/scope/lambda_tests.cpp | 8 ++++---- test/scope/this.cpp | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/test/scope/lambda_tests.cpp b/test/scope/lambda_tests.cpp index f77af2a..294d91f 100644 --- a/test/scope/lambda_tests.cpp +++ b/test/scope/lambda_tests.cpp @@ -184,16 +184,16 @@ main() } { - { + { // $$$ Fixme. This should not be failing $$$ //int x = (let(_a = lambda[val(1)])[_a])()(); //BOOST_TEST(x == 1); - } + } - { + { int x = (let(_a = lambda[val(1)])[bind(_a)])(); BOOST_TEST(x == 1); - } + } } { diff --git a/test/scope/this.cpp b/test/scope/this.cpp index 4695453..2f9ae57 100644 --- a/test/scope/this.cpp +++ b/test/scope/this.cpp @@ -59,20 +59,20 @@ int main() std::cout << _1 << " " , this_(_1 - 1) ] - , val(0) + , val(0) )); - /* - f(( - if_else( +/* + f(( + if_else( _1 == 0 , _1 ,this_(_1 - 1) ) )); - */ - - f(( +*/ + + f(( if_else( _1 != 0 ,this_(_1 - 1) @@ -120,5 +120,5 @@ int main() ) ) )); - */ +*/ } From 9f0a70e4576147e3f2be8df51f841eb54e04a41a Mon Sep 17 00:00:00 2001 From: John Fletcher Date: Fri, 24 Jan 2014 14:31:18 +0000 Subject: [PATCH 12/12] test/Jamfile correct file - all tests now pass --- test/Jamfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/Jamfile b/test/Jamfile index 61b769e..0e2805f 100644 --- a/test/Jamfile +++ b/test/Jamfile @@ -140,8 +140,8 @@ test-suite phoenix_include : [ run include/statement.cpp ] [ run include/stl.cpp ] [ run include/version.cpp ] - [ run include/bind/bind_member_function.cpp] - [ run include/bind/bind_member_variable.cpp] + [ run include/bind/bind_member_function.cpp ] + [ run include/bind/bind_member_variable.cpp ] [ run include/core/actor.cpp ] [ run include/core/argument.cpp ] [ run include/core/arity.cpp ]