mirror of
https://github.com/boostorg/fusion.git
synced 2025-08-02 22:14:34 +02:00
@@ -278,7 +278,6 @@ namespace boost { namespace fusion
|
|||||||
};
|
};
|
||||||
} // namespace boost::fusion::vector_detail
|
} // namespace boost::fusion::vector_detail
|
||||||
|
|
||||||
// This class provides backward compatibility: vector<T, ..., void_, void_, ...>.
|
|
||||||
template <typename... T>
|
template <typename... T>
|
||||||
struct vector
|
struct vector
|
||||||
: vector_detail::vector_data<
|
: vector_detail::vector_data<
|
||||||
|
@@ -8,6 +8,14 @@
|
|||||||
#define FUSION_CONVERT_10022005_1442
|
#define FUSION_CONVERT_10022005_1442
|
||||||
|
|
||||||
#include <boost/fusion/support/config.hpp>
|
#include <boost/fusion/support/config.hpp>
|
||||||
|
#if BOOST_WORKAROUND(BOOST_GCC, < 30500)
|
||||||
|
#include <boost/core/enable_if.hpp>
|
||||||
|
#include <boost/type_traits/is_const.hpp>
|
||||||
|
#define BOOST_FUSION_WA_GCC34(type1, type2) \
|
||||||
|
boost::lazy_disable_if<boost::is_const<Sequence>, type1, type2>
|
||||||
|
#else
|
||||||
|
#define BOOST_FUSION_WA_GCC34(type1, type2) type1, type2
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace boost { namespace fusion
|
namespace boost { namespace fusion
|
||||||
{
|
{
|
||||||
@@ -32,7 +40,7 @@ namespace boost { namespace fusion
|
|||||||
|
|
||||||
template <typename Tag, typename Sequence>
|
template <typename Tag, typename Sequence>
|
||||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||||
inline typename result_of::convert<Tag, Sequence>::type
|
inline typename BOOST_FUSION_WA_GCC34(result_of::convert<Tag, Sequence>)::type
|
||||||
convert(Sequence& seq)
|
convert(Sequence& seq)
|
||||||
{
|
{
|
||||||
typedef typename result_of::convert<Tag, Sequence>::gen gen;
|
typedef typename result_of::convert<Tag, Sequence>::gen gen;
|
||||||
@@ -49,4 +57,5 @@ namespace boost { namespace fusion
|
|||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
|
|
||||||
|
#undef BOOST_FUSION_WA_GCC34
|
||||||
#endif
|
#endif
|
||||||
|
@@ -8,6 +8,7 @@
|
|||||||
#define BOOST_FUSION_SEGMENTED_ITERATOR_RANGE_HPP_INCLUDED
|
#define BOOST_FUSION_SEGMENTED_ITERATOR_RANGE_HPP_INCLUDED
|
||||||
|
|
||||||
#include <boost/fusion/support/config.hpp>
|
#include <boost/fusion/support/config.hpp>
|
||||||
|
#include <boost/detail/workaround.hpp>
|
||||||
#include <boost/mpl/assert.hpp>
|
#include <boost/mpl/assert.hpp>
|
||||||
#include <boost/type_traits/add_const.hpp>
|
#include <boost/type_traits/add_const.hpp>
|
||||||
#include <boost/type_traits/remove_reference.hpp>
|
#include <boost/type_traits/remove_reference.hpp>
|
||||||
@@ -409,11 +410,14 @@ namespace boost { namespace fusion { namespace detail
|
|||||||
template <
|
template <
|
||||||
typename StackBegin
|
typename StackBegin
|
||||||
, typename StackEnd
|
, typename StackEnd
|
||||||
, bool SameSegment =
|
, bool SameSegment
|
||||||
result_of::equal_to<
|
#if !(BOOST_WORKAROUND(BOOST_GCC, >= 40000) && BOOST_WORKAROUND(BOOST_GCC, < 40200))
|
||||||
|
= result_of::equal_to<
|
||||||
typename StackBegin::car_type::begin_type
|
typename StackBegin::car_type::begin_type
|
||||||
, typename StackEnd::car_type::begin_type
|
, typename StackEnd::car_type::begin_type
|
||||||
>::type::value>
|
>::type::value
|
||||||
|
#endif
|
||||||
|
>
|
||||||
struct make_segmented_range_reduce2
|
struct make_segmented_range_reduce2
|
||||||
{
|
{
|
||||||
typedef
|
typedef
|
||||||
@@ -480,7 +484,14 @@ namespace boost { namespace fusion { namespace detail
|
|||||||
|
|
||||||
template <typename StackBegin, typename StackEnd, int StackBeginSize, int StackEndSize>
|
template <typename StackBegin, typename StackEnd, int StackBeginSize, int StackEndSize>
|
||||||
struct make_segmented_range_reduce
|
struct make_segmented_range_reduce
|
||||||
: make_segmented_range_reduce2<StackBegin, StackEnd>
|
: make_segmented_range_reduce2<StackBegin, StackEnd
|
||||||
|
#if BOOST_WORKAROUND(BOOST_GCC, >= 40000) && BOOST_WORKAROUND(BOOST_GCC, < 40200)
|
||||||
|
, result_of::equal_to<
|
||||||
|
typename StackBegin::car_type::begin_type
|
||||||
|
, typename StackEnd::car_type::begin_type
|
||||||
|
>::type::value
|
||||||
|
#endif
|
||||||
|
>
|
||||||
{};
|
{};
|
||||||
|
|
||||||
template <typename StackBegin, typename StackEnd>
|
template <typename StackBegin, typename StackEnd>
|
||||||
|
@@ -39,7 +39,10 @@ namespace boost { namespace fusion
|
|||||||
static type
|
static type
|
||||||
call(Iterator const& i)
|
call(Iterator const& i)
|
||||||
{
|
{
|
||||||
BOOST_STATIC_ASSERT((type::position::value < 2));
|
// Workaround for ICE on GCC 4.0.0.
|
||||||
|
// see https://svn.boost.org/trac/boost/ticket/5808
|
||||||
|
typedef typename type::position position;
|
||||||
|
BOOST_STATIC_ASSERT((position::value < 2));
|
||||||
return type(i.view);
|
return type(i.view);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@@ -27,7 +27,7 @@ main()
|
|||||||
|
|
||||||
{
|
{
|
||||||
// conversion vector to std tuple
|
// conversion vector to std tuple
|
||||||
std::tuple<int, std::string> t = convert<std_tuple_tag>(make_vector(123, "Hola!!!"));
|
std::tuple<int, std::string> t = convert<std_tuple_tag>(make_vector(123, std::string("Hola!!!")));
|
||||||
BOOST_TEST(std::get<0>(t) == 123);
|
BOOST_TEST(std::get<0>(t) == 123);
|
||||||
BOOST_TEST(std::get<1>(t) == "Hola!!!");
|
BOOST_TEST(std::get<1>(t) == "Hola!!!");
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user