From aa30bad7e4e2faf633764534a235ecf8428c03bb Mon Sep 17 00:00:00 2001 From: Eric Niebler Date: Wed, 19 Jan 2011 04:28:17 +0000 Subject: [PATCH] fix 1.46 showstopper, fix #5084 [SVN r68264] --- .../{detail => }/enable_comparison.hpp | 17 +++++------------ .../fusion/sequence/comparison/equal_to.hpp | 6 +++--- .../fusion/sequence/comparison/greater.hpp | 6 +++--- .../sequence/comparison/greater_equal.hpp | 6 +++--- .../boost/fusion/sequence/comparison/less.hpp | 6 +++--- .../fusion/sequence/comparison/less_equal.hpp | 10 +++++----- .../fusion/sequence/comparison/not_equal_to.hpp | 6 +++--- include/boost/fusion/support/is_sequence.hpp | 7 ++++++- 8 files changed, 31 insertions(+), 33 deletions(-) rename include/boost/fusion/sequence/comparison/{detail => }/enable_comparison.hpp (73%) diff --git a/include/boost/fusion/sequence/comparison/detail/enable_comparison.hpp b/include/boost/fusion/sequence/comparison/enable_comparison.hpp similarity index 73% rename from include/boost/fusion/sequence/comparison/detail/enable_comparison.hpp rename to include/boost/fusion/sequence/comparison/enable_comparison.hpp index c1925e87..d7d95383 100644 --- a/include/boost/fusion/sequence/comparison/detail/enable_comparison.hpp +++ b/include/boost/fusion/sequence/comparison/enable_comparison.hpp @@ -1,7 +1,7 @@ /*============================================================================= Copyright (c) 2001-2006 Joel de Guzman - 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) ==============================================================================*/ #if !defined(FUSION_ENABLE_COMPARISON_09232005_1958) @@ -14,28 +14,21 @@ #include #include #include -#include -namespace boost { namespace fusion { namespace detail +namespace boost { namespace fusion { namespace traits { - template - struct is_native_fusion_sequence - : is_convertible - {}; - - template + template struct enable_equality : mpl::or_, traits::is_sequence > {}; - template + template struct enable_comparison : mpl::and_< mpl::or_, traits::is_sequence > - , mpl::equal_to, result_of::size > + , mpl::equal_to, result_of::size > > {}; - }}} #endif diff --git a/include/boost/fusion/sequence/comparison/equal_to.hpp b/include/boost/fusion/sequence/comparison/equal_to.hpp index 0c8a37e4..67040cbe 100644 --- a/include/boost/fusion/sequence/comparison/equal_to.hpp +++ b/include/boost/fusion/sequence/comparison/equal_to.hpp @@ -2,7 +2,7 @@ Copyright (c) 1999-2003 Jaakko Jarvi Copyright (c) 2001-2006 Joel de Guzman - 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) ==============================================================================*/ #if !defined(FUSION_EQUAL_TO_05052005_0431) @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #if defined (BOOST_MSVC) @@ -38,7 +38,7 @@ namespace boost { namespace fusion template inline typename enable_if< - detail::enable_equality + traits::enable_equality , bool >::type operator==(Seq1 const& a, Seq2 const& b) diff --git a/include/boost/fusion/sequence/comparison/greater.hpp b/include/boost/fusion/sequence/comparison/greater.hpp index 8df806e4..7579c887 100644 --- a/include/boost/fusion/sequence/comparison/greater.hpp +++ b/include/boost/fusion/sequence/comparison/greater.hpp @@ -2,7 +2,7 @@ Copyright (c) 1999-2003 Jaakko Jarvi Copyright (c) 2001-2006 Joel de Guzman - 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) ==============================================================================*/ #if !defined(FUSION_GREATER_05052005_0432) @@ -11,7 +11,7 @@ #include #include #include -#include +#include #if defined(FUSION_DIRECT_OPERATOR_USAGE) #include @@ -38,7 +38,7 @@ namespace boost { namespace fusion template inline typename enable_if< - detail::enable_comparison + traits::enable_comparison , bool >::type operator>(Seq1 const& a, Seq2 const& b) diff --git a/include/boost/fusion/sequence/comparison/greater_equal.hpp b/include/boost/fusion/sequence/comparison/greater_equal.hpp index 3a20e0e8..dc7df230 100644 --- a/include/boost/fusion/sequence/comparison/greater_equal.hpp +++ b/include/boost/fusion/sequence/comparison/greater_equal.hpp @@ -2,7 +2,7 @@ Copyright (c) 1999-2003 Jaakko Jarvi Copyright (c) 2001-2006 Joel de Guzman - 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) ==============================================================================*/ #if !defined(FUSION_GREATER_EQUAL_05052005_0432) @@ -11,7 +11,7 @@ #include #include #include -#include +#include #if defined(FUSION_DIRECT_OPERATOR_USAGE) #include @@ -38,7 +38,7 @@ namespace boost { namespace fusion template inline typename enable_if< - detail::enable_comparison + traits::enable_comparison , bool >::type operator>=(Seq1 const& a, Seq2 const& b) diff --git a/include/boost/fusion/sequence/comparison/less.hpp b/include/boost/fusion/sequence/comparison/less.hpp index a86c3517..4022625a 100644 --- a/include/boost/fusion/sequence/comparison/less.hpp +++ b/include/boost/fusion/sequence/comparison/less.hpp @@ -2,7 +2,7 @@ Copyright (c) 1999-2003 Jaakko Jarvi Copyright (c) 2001-2006 Joel de Guzman - 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) ==============================================================================*/ #if !defined(FUSION_LESS_05052005_0432) @@ -12,7 +12,7 @@ #include #include #include -#include +#include namespace boost { namespace fusion { @@ -29,7 +29,7 @@ namespace boost { namespace fusion template inline typename enable_if< - detail::enable_comparison + traits::enable_comparison , bool >::type operator<(Seq1 const& a, Seq2 const& b) diff --git a/include/boost/fusion/sequence/comparison/less_equal.hpp b/include/boost/fusion/sequence/comparison/less_equal.hpp index 518e1c0f..2e9cecb9 100644 --- a/include/boost/fusion/sequence/comparison/less_equal.hpp +++ b/include/boost/fusion/sequence/comparison/less_equal.hpp @@ -2,7 +2,7 @@ Copyright (c) 1999-2003 Jaakko Jarvi Copyright (c) 2001-2006 Joel de Guzman - 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) ==============================================================================*/ #if !defined(FUSION_LESS_EQUAL_05052005_0432) @@ -11,7 +11,7 @@ #include #include #include -#include +#include #if defined(FUSION_DIRECT_OPERATOR_USAGE) #include @@ -35,7 +35,7 @@ namespace boost { namespace fusion namespace operators { -#if defined(BOOST_MSVC) && (BOOST_MSVC <= 1400) +#if defined(BOOST_MSVC) && (BOOST_MSVC <= 1400) // Workaround for VC8.0 and VC7.1 template inline bool @@ -60,12 +60,12 @@ namespace boost { namespace fusion #else // Somehow VC8.0 and VC7.1 does not like this code -// but barfs somewhere else. +// but barfs somewhere else. template inline typename enable_if< - detail::enable_comparison + traits::enable_comparison , bool >::type operator<=(Seq1 const& a, Seq2 const& b) diff --git a/include/boost/fusion/sequence/comparison/not_equal_to.hpp b/include/boost/fusion/sequence/comparison/not_equal_to.hpp index 54648e16..1b516a15 100644 --- a/include/boost/fusion/sequence/comparison/not_equal_to.hpp +++ b/include/boost/fusion/sequence/comparison/not_equal_to.hpp @@ -2,7 +2,7 @@ Copyright (c) 1999-2003 Jaakko Jarvi Copyright (c) 2001-2006 Joel de Guzman - 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) ==============================================================================*/ #if !defined(FUSION_NOT_EQUAL_TO_05052005_0431) @@ -11,7 +11,7 @@ #include #include #include -#include +#include #if defined(FUSION_DIRECT_OPERATOR_USAGE) #include @@ -41,7 +41,7 @@ namespace boost { namespace fusion template inline typename enable_if< - detail::enable_equality + traits::enable_equality , bool >::type operator!=(Seq1 const& a, Seq2 const& b) diff --git a/include/boost/fusion/support/is_sequence.hpp b/include/boost/fusion/support/is_sequence.hpp index 4dc9bdd8..f57ca23b 100644 --- a/include/boost/fusion/support/is_sequence.hpp +++ b/include/boost/fusion/support/is_sequence.hpp @@ -1,7 +1,7 @@ /*============================================================================= Copyright (c) 2001-2006 Joel de Guzman - 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) ==============================================================================*/ #if !defined(FUSION_IS_SEQUENCE_05052005_1002) @@ -63,6 +63,11 @@ namespace boost { namespace fusion typename fusion::detail::tag_of::type >::template apply {}; + + template + struct is_native_fusion_sequence + : is_convertible + {}; } }}