From acdd0e5a927b4b73d5c5e9339b6c107cd571b4a8 Mon Sep 17 00:00:00 2001 From: Aleksey Gurtovoy Date: Wed, 26 Sep 2001 09:57:52 +0000 Subject: [PATCH 1/9] dummy file [SVN r11268] --- dummy | 1 + 1 file changed, 1 insertion(+) create mode 100644 dummy diff --git a/dummy b/dummy new file mode 100644 index 0000000..4d6a3b4 --- /dev/null +++ b/dummy @@ -0,0 +1 @@ +ECHO is on. From 4cee88eae96a67300284380893d9702f67432915 Mon Sep 17 00:00:00 2001 From: Aleksey Gurtovoy Date: Sat, 29 Aug 2009 08:48:11 +0000 Subject: [PATCH 2/9] MPL refmanual: for_each doc fixes (thanks to Emil Dotchevski) [SVN r55858] --- doc/refmanual/for-each.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/refmanual/for-each.html b/doc/refmanual/for-each.html index 535678a..fa0759c 100644 --- a/doc/refmanual/for-each.html +++ b/doc/refmanual/for-each.html @@ -123,7 +123,7 @@ typedef next<in>:: Postcondition:

Equivalent to

-for_each< tranform_view<s,op> >( f );
+for_each< transform_view<s,op> >( f );
 
@@ -141,7 +141,7 @@ struct value_printer { template< typename U > void operator()(U x) { - std::cout << x << 'n'; + std::cout << x << '\n'; } }; From 11b9928353769a662f0d419e0e73425241fdb2bc Mon Sep 17 00:00:00 2001 From: Neil Groves Date: Tue, 11 May 2010 22:20:19 +0000 Subject: [PATCH 3/9] Improve compatibility with compilers other than GCC. [SVN r61922] --- include/boost/mpl/eval_if.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/boost/mpl/eval_if.hpp b/include/boost/mpl/eval_if.hpp index 442194f..e892703 100644 --- a/include/boost/mpl/eval_if.hpp +++ b/include/boost/mpl/eval_if.hpp @@ -4,8 +4,8 @@ // Copyright Aleksey Gurtovoy 2000-2004 // -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// 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) // // See http://www.boost.org/libs/mpl for documentation. @@ -43,7 +43,7 @@ struct eval_if BOOST_MPL_AUX_LAMBDA_SUPPORT(3,eval_if,(C,F1,F2)) }; -// (almost) copy & paste in order to save one more +// (almost) copy & paste in order to save one more // recursively nested template instantiation to user template< bool C From e174e49e3224664b874aebbd6faef336f9be4ae8 Mon Sep 17 00:00:00 2001 From: Steven Watanabe Date: Wed, 1 Sep 2010 15:16:53 +0000 Subject: [PATCH 4/9] Fix set_c iterators. [SVN r65166] --- include/boost/mpl/set/aux_/item.hpp | 6 +++--- test/set_c.cpp | 21 +++++++++++++++++++++ 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/include/boost/mpl/set/aux_/item.hpp b/include/boost/mpl/set/aux_/item.hpp index 4433572..e90e490 100644 --- a/include/boost/mpl/set/aux_/item.hpp +++ b/include/boost/mpl/set/aux_/item.hpp @@ -32,7 +32,7 @@ struct s_item typedef s_item item_; typedef void_ last_masked_; typedef T item_type_; - typedef Base base; + typedef typename Base::item_ base; typedef typename next< typename Base::size >::type size; typedef typename next< typename Base::order >::type order; @@ -55,7 +55,7 @@ struct s_mask typedef s_mask item_; typedef T last_masked_; typedef void_ item_type_; - typedef Base base; + typedef typename Base::item_ base; typedef typename prior< typename Base::size >::type size; BOOST_MPL_AUX_SET_OVERLOAD( aux::yes_tag, IS_MASKED, s_mask, aux::type_wrapper* ); @@ -69,7 +69,7 @@ struct s_unmask typedef s_unmask item_; typedef void_ last_masked_; typedef T item_type_; - typedef Base base; + typedef typename Base::item_ base; typedef typename next< typename Base::size >::type size; BOOST_MPL_AUX_SET_OVERLOAD( aux::no_tag, IS_MASKED, s_unmask, aux::type_wrapper* ); diff --git a/test/set_c.cpp b/test/set_c.cpp index 1a6e970..e34d86d 100644 --- a/test/set_c.cpp +++ b/test/set_c.cpp @@ -14,6 +14,7 @@ #include #include #include +#include #include @@ -59,6 +60,18 @@ MPL_TEST_CASE() MPL_ASSERT(( is_same< test::at_c::type, void_ > )); MPL_ASSERT(( is_same< test::at_c::type, void_ > )); #endif + + typedef begin::type first1; + typedef end::type last1; + MPL_ASSERT_RELATION( (distance::value), ==, 1 ); + + typedef begin::type first2; + typedef end::type last2; + MPL_ASSERT_RELATION( (distance::value), ==, 1 ); + + typedef begin::type first3; + typedef end::type last3; + MPL_ASSERT_RELATION( (distance::value), ==, 2 ); } #endif @@ -82,4 +95,12 @@ MPL_TEST_CASE() MPL_ASSERT(( is_same< test::at_c::type, void_ > )); MPL_ASSERT(( is_same< test::at_c::type, void_ > )); #endif + + typedef begin::type first1; + typedef end::type last1; + MPL_ASSERT_RELATION( (distance::value), ==, 1 ); + + typedef begin::type first2; + typedef end::type last2; + MPL_ASSERT_RELATION( (distance::value), ==, 8 ); } From 8886e3d7da065a996c581104e73439f607eeba61 Mon Sep 17 00:00:00 2001 From: Steven Watanabe Date: Wed, 8 Dec 2010 17:21:32 +0000 Subject: [PATCH 5/9] Fix name in list example. Fixes #4875. [SVN r67105] --- doc/refmanual/list.html | 2 +- doc/src/refmanual/list.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/refmanual/list.html b/doc/refmanual/list.html index 8f6a809..e267a5a 100644 --- a/doc/refmanual/list.html +++ b/doc/refmanual/list.html @@ -142,7 +142,7 @@ of l in the same order; see

Example

 typedef list<float,double,long double> floats;
-typedef push_front<floating_types,int>::type types;
+typedef push_front<floats,int>::type types;
 
 BOOST_MPL_ASSERT(( is_same< front<types>::type, int > ));
 
diff --git a/doc/src/refmanual/list.rst b/doc/src/refmanual/list.rst index abbc93a..5de356d 100644 --- a/doc/src/refmanual/list.rst +++ b/doc/src/refmanual/list.rst @@ -102,7 +102,7 @@ Example .. parsed-literal:: typedef list floats; - typedef push_front::type types; + typedef push_front::type types; BOOST_MPL_ASSERT(( is_same< front::type, int > )); From 3bf644fc1088d8302499ebaecfc06bd1b0a0229b Mon Sep 17 00:00:00 2001 From: Joel Falcou Date: Sun, 6 Mar 2011 11:09:13 +0000 Subject: [PATCH 6/9] Fully qualified mpl::for_each call to prevent conflict with phoenix::for_each on some compiler. [SVN r69601] --- include/boost/mpl/for_each.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/boost/mpl/for_each.hpp b/include/boost/mpl/for_each.hpp index 1feadc9..66fd01b 100644 --- a/include/boost/mpl/for_each.hpp +++ b/include/boost/mpl/for_each.hpp @@ -108,7 +108,9 @@ template< inline void for_each(F f, Sequence* = 0) { - for_each >(f); + // jfalcou: fully qualifying this call so it doesnt clash with phoenix::for_each + // ons ome compilers -- done on 02/28/2011 + boost::mpl::for_each >(f); } }} From 74fef329d4f5228198862d9eafe6a51377ae3fc4 Mon Sep 17 00:00:00 2001 From: Joel Falcou Date: Sun, 10 Apr 2011 07:07:01 +0000 Subject: [PATCH 7/9] Applied documentation patch from Daniel James. Fix Ticket #5240 [SVN r71159] --- doc/tutorial/apply-lambda-semantics.html | 2 +- doc/tutorial/numeric-metafunction.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/tutorial/apply-lambda-semantics.html b/doc/tutorial/apply-lambda-semantics.html index 154ff86..2e60b55 100644 --- a/doc/tutorial/apply-lambda-semantics.html +++ b/doc/tutorial/apply-lambda-semantics.html @@ -78,7 +78,7 @@ one.

To get a detailed picture of the new apply/lambda semantics, please see the test case at -http://cvs.sourceforge.net/viewcvs.py/boost/boost/libs/mpl/test/apply.cpp?view=markup +libs/mpl/test/apply.cpp and the corresponding sections of the MPL reference manual.

diff --git a/doc/tutorial/numeric-metafunction.html b/doc/tutorial/numeric-metafunction.html index 8a6dcb4..6a78fa0 100644 --- a/doc/tutorial/numeric-metafunction.html +++ b/doc/tutorial/numeric-metafunction.html @@ -24,7 +24,7 @@ arguments of different types, and the result will yield the largest/most general of the argument types. The infrastructure allows user-defined numeric types to be freely intermixed with predefined library types. See -http://cvs.sourceforge.net/viewcvs.py/boost/boost/libs/mpl/test/numeric_ops.cpp?view=markup +libs/mpl/test/numeric_ops.cpp for an illustrative example, and the reference manual for the formal infrastructure specification.

If you were using MPL numeric metafunctions on your own integral From 94154603ec2b9f668da3db654c6c92f5fb7ac75a Mon Sep 17 00:00:00 2001 From: Joel Falcou Date: Sun, 10 Apr 2011 11:27:54 +0000 Subject: [PATCH 8/9] mpl::always is now nullary. Test is updated to take care of new possible calls using apply and apply0. [SVN r71163] --- include/boost/mpl/always.hpp | 7 +++---- test/always.cpp | 10 ++++++++-- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/include/boost/mpl/always.hpp b/include/boost/mpl/always.hpp index 722c4b3..5fe7132 100644 --- a/include/boost/mpl/always.hpp +++ b/include/boost/mpl/always.hpp @@ -14,7 +14,7 @@ // $Date$ // $Revision$ -#include +#include #include #include @@ -23,8 +23,7 @@ namespace boost { namespace mpl { template< typename Value > struct always { template< - typename T - BOOST_MPL_PP_NESTED_DEF_PARAMS_TAIL(1, typename T, na) + BOOST_MPL_PP_DEFAULT_PARAMS(BOOST_MPL_LIMIT_METAFUNCTION_ARITY, typename T, na) > struct apply { @@ -32,7 +31,7 @@ template< typename Value > struct always }; }; -BOOST_MPL_AUX_ARITY_SPEC(1, always) +BOOST_MPL_AUX_ARITY_SPEC(0, always) }} diff --git a/test/always.cpp b/test/always.cpp index 7a93615..53294b1 100644 --- a/test/always.cpp +++ b/test/always.cpp @@ -22,6 +22,8 @@ MPL_TEST_CASE() { typedef always always_true; + MPL_ASSERT(( apply< always_true > )); + MPL_ASSERT(( apply0< always_true > )); MPL_ASSERT(( apply1< always_true,false_ > )); MPL_ASSERT(( apply2< always_true,false_,false_ > )); MPL_ASSERT(( apply3< always_true,false_,false_,false_ > )); @@ -31,11 +33,15 @@ MPL_TEST_CASE() MPL_TEST_CASE() { typedef always< int_<10> > always_10; - + + typedef apply< always_10 >::type res; + typedef apply0< always_10 >::type res0; typedef apply1< always_10,int_<0> >::type res1; typedef apply2< always_10,int_<0>,int_<0> >::type res2; typedef apply3< always_10,int_<0>,int_<0>,int_<0> >::type res3; - + + MPL_ASSERT_RELATION( res::value, ==, 10 ); + MPL_ASSERT_RELATION( res0::value, ==, 10 ); MPL_ASSERT_RELATION( res1::value, ==, 10 ); MPL_ASSERT_RELATION( res2::value, ==, 10 ); MPL_ASSERT_RELATION( res3::value, ==, 10 ); From 2d3c8f076dc1de945ceb8a34ed5b7298208c6e72 Mon Sep 17 00:00:00 2001 From: Joel Falcou Date: Tue, 17 May 2011 18:16:59 +0000 Subject: [PATCH 9/9] Applied an adapted version of patch from Ticket #4364 [SVN r72020] --- include/boost/mpl/has_xxx.hpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/boost/mpl/has_xxx.hpp b/include/boost/mpl/has_xxx.hpp index 379bd0c..bdca255 100644 --- a/include/boost/mpl/has_xxx.hpp +++ b/include/boost/mpl/has_xxx.hpp @@ -290,18 +290,24 @@ struct trait \ # if !defined(BOOST_MPL_HAS_XXX_NO_WRAPPED_TYPES) # if BOOST_WORKAROUND(BOOST_MSVC, <= 1400) # define BOOST_MPL_HAS_XXX_NO_WRAPPED_TYPES 1 +# else +# define BOOST_MPL_HAS_XXX_NO_WRAPPED_TYPES 0 # endif # endif # if !defined(BOOST_MPL_HAS_XXX_NO_EXPLICIT_TEST_FUNCTION) # if (defined(BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS)) # define BOOST_MPL_HAS_XXX_NO_EXPLICIT_TEST_FUNCTION 1 +# else +# define BOOST_MPL_HAS_XXX_NO_EXPLICIT_TEST_FUNCTION 0 # endif # endif # if !defined(BOOST_MPL_HAS_XXX_NEEDS_TEMPLATE_SFINAE) # if BOOST_WORKAROUND(BOOST_MSVC, <= 1400) # define BOOST_MPL_HAS_XXX_NEEDS_TEMPLATE_SFINAE 1 +# else +# define BOOST_MPL_HAS_XXX_NEEDS_TEMPLATE_SFINAE 0 # endif # endif