1 /*=============================================================================
2 Copyright (c) 2001-2011 Joel de Guzman
3 Copyright (c) 2007 Tobias Schwinger
5 Distributed under the Boost Software License, Version 1.0. (See accompanying
6 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7 ==============================================================================*/
8 #if !defined(FUSION_SEQUENCE_BASE_04182005_0737)
9 #define FUSION_SEQUENCE_BASE_04182005_0737
11 #include <boost/config.hpp>
12 #include <boost/fusion/support/config.hpp>
13 #include <boost/mpl/begin_end_fwd.hpp>
15 namespace boost { namespace fusion
19 struct from_sequence_convertible_type
23 template <typename Sequence>
26 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
28 derived() const BOOST_NOEXCEPT
30 return static_cast<Sequence const&>(*this);
33 BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
35 derived() BOOST_NOEXCEPT
37 return static_cast<Sequence&>(*this);
40 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
41 operator detail::from_sequence_convertible_type() const BOOST_NOEXCEPT
43 return detail::from_sequence_convertible_type();
47 struct fusion_sequence_tag;
50 namespace boost { namespace mpl
52 // Deliberately break mpl::begin, so it doesn't lie that a Fusion sequence
53 // is not an MPL sequence by returning mpl::void_.
54 // In other words: Fusion Sequences are always MPL Sequences, but they can
55 // be incompletely defined.
56 template<> struct begin_impl< boost::fusion::fusion_sequence_tag >;