mirror of
https://github.com/boostorg/fusion.git
synced 2025-07-25 01:57:15 +02:00
prevents potential ODR violation through mpl::begin / mpl::is_sequence
[SVN r36727]
This commit is contained in:
@ -1,5 +1,6 @@
|
|||||||
/*=============================================================================
|
/*=============================================================================
|
||||||
Copyright (c) 2001-2006 Joel de Guzman
|
Copyright (c) 2001-2006 Joel de Guzman
|
||||||
|
Copyright (c) 2007 Tobias Schwinger
|
||||||
|
|
||||||
Use, modification and distribution is subject to the Boost Software
|
Use, modification and distribution is subject to the Boost Software
|
||||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||||
@ -9,6 +10,7 @@
|
|||||||
#define FUSION_SEQUENCE_BASE_04182005_0737
|
#define FUSION_SEQUENCE_BASE_04182005_0737
|
||||||
|
|
||||||
#include <boost/fusion/support/detail/compiler_config.hpp>
|
#include <boost/fusion/support/detail/compiler_config.hpp>
|
||||||
|
#include <boost/mpl/begin_end_fwd.hpp>
|
||||||
|
|
||||||
namespace boost { namespace fusion
|
namespace boost { namespace fusion
|
||||||
{
|
{
|
||||||
@ -29,6 +31,17 @@ namespace boost { namespace fusion
|
|||||||
return static_cast<Sequence&>(*this);
|
return static_cast<Sequence&>(*this);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct fusion_sequence_tag;
|
||||||
|
}}
|
||||||
|
|
||||||
|
namespace boost { namespace mpl
|
||||||
|
{
|
||||||
|
// Deliberately break mpl::begin, so it doesn't lie that a Fusion sequence
|
||||||
|
// is not an MPL sequence by returning mpl::void_.
|
||||||
|
// In other words: Fusion Sequences are always MPL Sequences, but they can
|
||||||
|
// be incompletely defined.
|
||||||
|
template<> struct begin_impl< boost::fusion::fusion_sequence_tag >;
|
||||||
}}
|
}}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user