diff --git a/include/boost/phoenix/bind/bind.hpp b/include/boost/phoenix/bind/bind.hpp index 00df83e..e7791e0 100644 --- a/include/boost/phoenix/bind/bind.hpp +++ b/include/boost/phoenix/bind/bind.hpp @@ -3,6 +3,7 @@ #ifndef PHOENIX_BIND_BIND_HPP #define PHOENIX_BIND_BIND_HPP +#include #include #include #include @@ -17,6 +18,7 @@ #ifndef PHOENIX_BIND_BIND_HPP #define PHOENIX_BIND_BIND_HPP +#include #include #include #include diff --git a/include/boost/phoenix/function/function.hpp b/include/boost/phoenix/function/function.hpp index 9f9f623..0f8a88c 100644 --- a/include/boost/phoenix/function/function.hpp +++ b/include/boost/phoenix/function/function.hpp @@ -8,11 +8,11 @@ #ifndef PHOENIX_FUNCTION_FUNCTION_HPP #define PHOENIX_FUNCTION_FUNCTION_HPP -#include -#include #include +#include +#include +#include #include -#include #include #include @@ -83,7 +83,6 @@ namespace boost { namespace phoenix operator()() const { return expression::function::make(f); - //return proto::make_expr(f); } // Bring in the rest diff --git a/include/boost/phoenix/fusion/at.hpp b/include/boost/phoenix/fusion/at.hpp index 7d52815..7d2fdc3 100644 --- a/include/boost/phoenix/fusion/at.hpp +++ b/include/boost/phoenix/fusion/at.hpp @@ -9,9 +9,10 @@ #ifndef PHOENIX_FUSION_AT_HPP #define PHOENIX_FUSION_AT_HPP +#include #include -#include #include +#include #include namespace boost { namespace phoenix diff --git a/include/boost/phoenix/object/const_cast.hpp b/include/boost/phoenix/object/const_cast.hpp index 05f987a..49b0f5d 100644 --- a/include/boost/phoenix/object/const_cast.hpp +++ b/include/boost/phoenix/object/const_cast.hpp @@ -10,7 +10,9 @@ #include #include +#include #include +#include namespace boost { namespace phoenix { diff --git a/include/boost/phoenix/object/construct.hpp b/include/boost/phoenix/object/construct.hpp index faf8d1f..37436f9 100644 --- a/include/boost/phoenix/object/construct.hpp +++ b/include/boost/phoenix/object/construct.hpp @@ -10,8 +10,9 @@ #include #include +#include +#include #include -#include namespace boost { namespace phoenix { diff --git a/include/boost/phoenix/object/delete.hpp b/include/boost/phoenix/object/delete.hpp index 1ab3149..69c1c13 100644 --- a/include/boost/phoenix/object/delete.hpp +++ b/include/boost/phoenix/object/delete.hpp @@ -8,7 +8,9 @@ #ifndef PHOENIX_OBJECT_DELETE_HPP #define PHOENIX_OBJECT_DELETE_HPP +#include #include +#include namespace boost { namespace phoenix { diff --git a/include/boost/phoenix/object/dynamic_cast.hpp b/include/boost/phoenix/object/dynamic_cast.hpp index 41ecb61..7eb33bd 100644 --- a/include/boost/phoenix/object/dynamic_cast.hpp +++ b/include/boost/phoenix/object/dynamic_cast.hpp @@ -10,7 +10,9 @@ #include #include +#include #include +#include namespace boost { namespace phoenix { diff --git a/include/boost/phoenix/object/new.hpp b/include/boost/phoenix/object/new.hpp index 47efebb..9c71726 100644 --- a/include/boost/phoenix/object/new.hpp +++ b/include/boost/phoenix/object/new.hpp @@ -10,8 +10,9 @@ #include #include +#include +#include #include -#include namespace boost { namespace phoenix { diff --git a/include/boost/phoenix/object/reinterpret_cast.hpp b/include/boost/phoenix/object/reinterpret_cast.hpp index 3c0b694..1ae3ea9 100644 --- a/include/boost/phoenix/object/reinterpret_cast.hpp +++ b/include/boost/phoenix/object/reinterpret_cast.hpp @@ -10,7 +10,9 @@ #include #include +#include #include +#include namespace boost { namespace phoenix { diff --git a/include/boost/phoenix/object/static_cast.hpp b/include/boost/phoenix/object/static_cast.hpp index 1f79890..eeedaa7 100644 --- a/include/boost/phoenix/object/static_cast.hpp +++ b/include/boost/phoenix/object/static_cast.hpp @@ -10,7 +10,9 @@ #include #include +#include #include +#include namespace boost { namespace phoenix { diff --git a/include/boost/phoenix/operator.hpp b/include/boost/phoenix/operator.hpp index e8d6b2e..c5984ff 100644 --- a/include/boost/phoenix/operator.hpp +++ b/include/boost/phoenix/operator.hpp @@ -9,39 +9,6 @@ #ifndef PHOENIX_OPERATOR_HPP #define PHOENIX_OPERATOR_HPP -#define PHOENIX_UNARY_RULE(__, ___, name) \ - struct name \ - : proto::unary_expr \ - {}; \ -/**/ - -#define PHOENIX_BINARY_RULE(__, ___, name) \ - struct name \ - : proto::binary_expr \ - {}; \ -/**/ - -#define PHOENIX_GRAMMAR(_, __, name) \ - template \ - struct meta_grammar::case_ \ - : proto::when \ - {}; \ -/**/ - -#define PHOENIX_UNARY_OPERATORS(ops) \ - namespace rule { \ - BOOST_PP_SEQ_FOR_EACH(PHOENIX_UNARY_RULE, _, ops) \ - } \ - BOOST_PP_SEQ_FOR_EACH(PHOENIX_GRAMMAR, _, ops) \ -/**/ - -#define PHOENIX_BINARY_OPERATORS(ops) \ - namespace rule { \ - BOOST_PP_SEQ_FOR_EACH(PHOENIX_BINARY_RULE, _, ops) \ - } \ - BOOST_PP_SEQ_FOR_EACH(PHOENIX_GRAMMAR, _, ops) \ -/**/ - #include #include #include @@ -52,10 +19,4 @@ #include #include -#undef PHOENIX_UNARY_RULE -#undef PHOENIX_BINARY_RULE -#undef PHOENIX_GRAMMAR -#undef PHOENIX_UNARY_OPERATORS -#undef PHOENIX_BINARY_OPERATORS - #endif diff --git a/include/boost/phoenix/operator/arithmetic.hpp b/include/boost/phoenix/operator/arithmetic.hpp index d86d97f..b1e430f 100644 --- a/include/boost/phoenix/operator/arithmetic.hpp +++ b/include/boost/phoenix/operator/arithmetic.hpp @@ -8,7 +8,7 @@ #ifndef PHOENIX_OPERATOR_ARITHMETIC_HPP #define PHOENIX_OPERATOR_ARITHMETIC_HPP -#include +#include namespace boost { namespace phoenix { @@ -35,4 +35,6 @@ namespace boost { namespace phoenix ) }} +#include + #endif diff --git a/include/boost/phoenix/operator/bitwise.hpp b/include/boost/phoenix/operator/bitwise.hpp index 3f30570..d4c01bb 100644 --- a/include/boost/phoenix/operator/bitwise.hpp +++ b/include/boost/phoenix/operator/bitwise.hpp @@ -8,7 +8,7 @@ #ifndef PHOENIX_OPERATOR_BITWISE_HPP #define PHOENIX_OPERATOR_BITWISE_HPP -#include +#include namespace boost { namespace phoenix { @@ -30,4 +30,6 @@ namespace boost { namespace phoenix ) }} +#include + #endif diff --git a/include/boost/phoenix/operator/comparision.hpp b/include/boost/phoenix/operator/comparision.hpp index 6ef25ae..e353a38 100644 --- a/include/boost/phoenix/operator/comparision.hpp +++ b/include/boost/phoenix/operator/comparision.hpp @@ -8,7 +8,7 @@ #ifndef PHOENIX_OPERATOR_COMPARISION_HPP #define PHOENIX_OPERATOR_COMPARISION_HPP -#include +#include namespace boost { namespace phoenix { @@ -23,4 +23,6 @@ namespace boost { namespace phoenix ) }} +#include + #endif diff --git a/include/boost/phoenix/operator/detail/define_operator.hpp b/include/boost/phoenix/operator/detail/define_operator.hpp new file mode 100644 index 0000000..4ae2230 --- /dev/null +++ b/include/boost/phoenix/operator/detail/define_operator.hpp @@ -0,0 +1,48 @@ +/*============================================================================== + 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) +==============================================================================*/ + +#ifndef PHOENIX_DEFINE_OPERATOR_HPP +#define PHOENIX_DEFINE_OPERATOR_HPP + +#include +#include + +#define PHOENIX_UNARY_RULE(__, ___, name) \ + struct name \ + : proto::unary_expr \ + {}; \ +/**/ + +#define PHOENIX_BINARY_RULE(__, ___, name) \ + struct name \ + : proto::binary_expr \ + {}; \ +/**/ + +#define PHOENIX_GRAMMAR(_, __, name) \ + template \ + struct meta_grammar::case_ \ + : proto::when \ + {}; \ +/**/ + +#define PHOENIX_UNARY_OPERATORS(ops) \ + namespace rule { \ + BOOST_PP_SEQ_FOR_EACH(PHOENIX_UNARY_RULE, _, ops) \ + } \ + BOOST_PP_SEQ_FOR_EACH(PHOENIX_GRAMMAR, _, ops) \ +/**/ + +#define PHOENIX_BINARY_OPERATORS(ops) \ + namespace rule { \ + BOOST_PP_SEQ_FOR_EACH(PHOENIX_BINARY_RULE, _, ops) \ + } \ + BOOST_PP_SEQ_FOR_EACH(PHOENIX_GRAMMAR, _, ops) \ +/**/ + +#endif diff --git a/include/boost/phoenix/operator/detail/undef_operator.hpp b/include/boost/phoenix/operator/detail/undef_operator.hpp new file mode 100644 index 0000000..c521fb2 --- /dev/null +++ b/include/boost/phoenix/operator/detail/undef_operator.hpp @@ -0,0 +1,6 @@ + +#undef PHOENIX_UNARY_RULE +#undef PHOENIX_BINARY_RULE +#undef PHOENIX_GRAMMAR +#undef PHOENIX_UNARY_OPERATORS +#undef PHOENIX_BINARY_OPERATORS diff --git a/include/boost/phoenix/operator/io.hpp b/include/boost/phoenix/operator/io.hpp index 7a4d316..675e43b 100644 --- a/include/boost/phoenix/operator/io.hpp +++ b/include/boost/phoenix/operator/io.hpp @@ -8,8 +8,11 @@ #ifndef PHOENIX_OPERATOR_IO_HPP #define PHOENIX_OPERATOR_IO_HPP -//#include -//#include +#include + +#include +#include +#include #include #include diff --git a/include/boost/phoenix/operator/logical.hpp b/include/boost/phoenix/operator/logical.hpp index 3c6c18a..b143ee6 100644 --- a/include/boost/phoenix/operator/logical.hpp +++ b/include/boost/phoenix/operator/logical.hpp @@ -8,7 +8,7 @@ #ifndef PHOENIX_OPERATOR_LOGICAL_HPP #define PHOENIX_OPERATOR_LOGICAL_HPP -#include +#include namespace boost { namespace phoenix { @@ -22,4 +22,6 @@ namespace boost { namespace phoenix ) }} +#include + #endif diff --git a/include/boost/phoenix/operator/operator.hpp b/include/boost/phoenix/operator/operator.hpp deleted file mode 100644 index 02d2894..0000000 --- a/include/boost/phoenix/operator/operator.hpp +++ /dev/null @@ -1,13 +0,0 @@ -/*============================================================================== - Copyright (c) 2001-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) -==============================================================================*/ -#ifndef PHOENIX_OPERATOR_OPERATOR_HPP -#define PHOENIX_OPERATOR_OPERATOR_HPP - -#include - -#endif diff --git a/include/boost/phoenix/operator/self.hpp b/include/boost/phoenix/operator/self.hpp index 7d9ee84..984b8ca 100644 --- a/include/boost/phoenix/operator/self.hpp +++ b/include/boost/phoenix/operator/self.hpp @@ -8,7 +8,7 @@ #ifndef PHOENIX_OPERATOR_SELF_HPP #define PHOENIX_OPERATOR_SELF_HPP -#include +#include namespace boost { namespace phoenix { @@ -22,4 +22,6 @@ namespace boost { namespace phoenix ) }} +#include + #endif diff --git a/test/Jamfile b/test/Jamfile index e64641b..e02f69a 100644 --- a/test/Jamfile +++ b/test/Jamfile @@ -123,7 +123,19 @@ test-suite phoenix_regression : ; test-suite phoenix_include : + [ run include/bind.cpp ] [ run include/core.cpp ] + [ run include/function.cpp ] +# [ run include/fusion.cpp ] +# [ run include/object.cpp ] +# [ run include/operator.cpp ] +# [ run include/scope.cpp ] +# [ run include/statement.cpp ] +# [ run include/stl.cpp ] + [ run include/bind/bind.cpp ] + [ run include/version.cpp ] +# [ run include/bind/bind_member_function.cpp ] +# [ run include/bind/bind_member_variable.cpp ] [ run include/core/terminal.cpp ] [ run include/core/nothing.cpp ] [ run include/core/environment.cpp ] @@ -132,7 +144,6 @@ test-suite phoenix_include : [ run include/core/argument.cpp ] [ run include/core/function_equal.cpp ] [ run include/core/is_actor.cpp ] - [ run include/core/test.cpp ] [ run include/core/arity.cpp ] [ run include/core/mem_obj_ptr.cpp ] [ run include/core/visit_each.cpp ] @@ -142,16 +153,29 @@ test-suite phoenix_include : [ run include/core/is_nullary.cpp ] [ run include/core/limits.cpp ] [ run include/core/actor.cpp ] -# [ run include/operator.cpp ] -# [ run include/function/function.cpp ] -# [ run include/stl/algorithm/transformation.cpp ] -# [ run include/stl/algorithm/iteration.cpp ] -# [ run include/stl/algorithm/querying.cpp ] -# [ run include/stl/container/container.cpp ] -# [ run include/stl/algorithm.cpp ] -# [ run include/stl/container.cpp ] -# [ run include/scope.cpp ] -# [ run include/version.cpp ] + [ run include/function/function.cpp ] + [ run include/fusion/at.cpp ] + [ run include/object/const_cast.cpp ] + [ run include/object/construct.cpp ] + [ run include/object/delete.cpp ] + [ run include/object/dynamic_cast.cpp ] + [ run include/object/new.cpp ] + [ run include/object/reinterpret_cast.cpp ] + [ run include/object/static_cast.cpp ] + [ run include/operator/arithmetic.cpp ] + [ run include/operator/bitwise.cpp ] + [ run include/operator/comparision.cpp ] + [ run include/operator/if_else.cpp ] + [ run include/operator/io.cpp ] + [ run include/operator/logical.cpp ] + [ run include/operator/member.cpp ] + [ run include/operator/self.cpp ] +# [ run include/scope/dynamic.cpp ] +# [ run include/scope/this.cpp ] +# [ run include/scope/local_variable.cpp ] +# [ run include/scope/scoped_environment.cpp ] +# [ run include/scope/lambda.cpp ] +# [ run include/scope/let.cpp ] # [ run include/statement/switch.cpp ] # [ run include/statement/do_while.cpp ] # [ run include/statement/try_catch.cpp ] @@ -160,38 +184,12 @@ test-suite phoenix_include : # [ run include/statement/throw.cpp ] # [ run include/statement/while.cpp ] # [ run include/statement/for.cpp ] -# [ run include/fusion/at.cpp ] -# [ run include/object.cpp ] -# [ run include/bind/bind_member_function.cpp ] -# [ run include/bind/bind.cpp ] -# [ run include/bind/bind_member_variable.cpp ] -# [ run include/operator/operator.cpp ] -# [ run include/operator/if_else.cpp ] -# [ run include/operator/member.cpp ] -# [ run include/operator/bitwise.cpp ] -# [ run include/operator/logical.cpp ] -# [ run include/operator/io.cpp ] -# [ run include/operator/arithmetic.cpp ] -# [ run include/operator/self.cpp ] -# [ run include/operator/comparision.cpp ] -# [ run include/bind.cpp ] -# [ run include/object/dynamic_cast.cpp ] -# [ run include/object/const_cast.cpp ] -# [ run include/object/reinterpret_cast.cpp ] -# [ run include/object/static_cast.cpp ] -# [ run include/object/delete.cpp ] -# [ run include/object/construct.cpp ] -# [ run include/object/new.cpp ] -# [ run include/fusion.cpp ] +# [ run include/stl/algorithm/iteration.cpp ] +# [ run include/stl/algorithm/querying.cpp ] +# [ run include/stl/algorithm/transformation.cpp ] +# [ run include/stl/container/container.cpp ] +# [ run include/stl/algorithm.cpp ] +# [ run include/stl/container.cpp ] # [ run include/support/preprocessor/round.cpp ] # [ run include/support/iterate.cpp ] -# [ run include/function.cpp ] -# [ run include/statement.cpp ] -# [ run include/stl.cpp ] -# [ run include/scope/dynamic.cpp ] -# [ run include/scope/this.cpp ] -# [ run include/scope/local_variable.cpp ] -# [ run include/scope/scoped_environment.cpp ] -# [ run include/scope/lambda.cpp ] -# [ run include/scope/let.cpp ] ;