Merge remote-tracking branch 'origin/develop' into feature/constexpr

This commit is contained in:
Kohei Takahashi
2015-03-04 02:20:52 +09:00
88 changed files with 1904 additions and 530 deletions

View File

@ -118,4 +118,13 @@ namespace boost { namespace fusion {
}}
#ifdef BOOST_FUSION_WORKAROUND_FOR_LWG_2408
namespace std
{
template <typename Seq, int Pos>
struct iterator_traits< ::boost::fusion::deque_iterator<Seq, Pos> >
{ };
}
#endif
#endif

View File

@ -141,7 +141,10 @@ FUSION_HASH if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
{}
template<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, typename U)>
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
deque(deque<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, U)>&& seq)
deque(deque<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, U)>&& seq
, typename disable_if<
is_convertible<deque<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, U)>, T0>
>::type* /*dummy*/ = 0)
: base(std::forward<deque<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, U)>>(seq))
{}
template <typename T>

View File

@ -66,7 +66,8 @@ namespace boost { namespace fusion { namespace detail
template <typename U, typename Rst>
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
keyed_element(keyed_element<Key, U, Rst> const& rhs)
keyed_element(keyed_element<Key, U, Rst> const& rhs
, typename enable_if<is_convertible<U, Value> >::type* = 0)
: Rest(rhs.get_base()), value_(rhs.value_)
{}

View File

@ -99,4 +99,13 @@ namespace boost { namespace fusion
};
}}
#ifdef BOOST_FUSION_WORKAROUND_FOR_LWG_2408
namespace std
{
template <typename Cons>
struct iterator_traits< ::boost::fusion::cons_iterator<Cons> >
{ };
}
#endif
#endif

View File

@ -24,6 +24,15 @@
#include <boost/fusion/container/vector/vector.hpp>
#include <boost/mpl/identity.hpp>
#include <boost/mpl/bool.hpp>
#include <boost/preprocessor/iterate.hpp>
#include <boost/preprocessor/repetition/enum_params.hpp>
#include <boost/preprocessor/repetition/enum_binary_params.hpp>
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && \
defined(BOOST_MSVC) && (BOOST_MSVC == 1700)
// see map_forward_ctor.hpp
#include <boost/core/enable_if.hpp>
#include <boost/type_traits/is_same.hpp>
#endif
#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES)
#include <boost/fusion/container/map/detail/cpp03/preprocessed/map.hpp>
@ -45,6 +54,8 @@
#pragma wave option(preserve: 1)
#endif
#define FUSION_HASH #
namespace boost { namespace fusion
{
struct void_;
@ -69,6 +80,10 @@ namespace boost { namespace fusion
map()
: data() {}
BOOST_FUSION_GPU_ENABLED
map(map const& rhs)
: data(rhs.data) {}
template <typename Sequence>
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
map(Sequence const& rhs)
@ -91,6 +106,34 @@ namespace boost { namespace fusion
return *this;
}
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
FUSION_HASH if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
#endif
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) || \
(defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES))
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
map(map&& rhs)
: data(std::move(rhs.data)) {}
template <typename T>
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
map& operator=(T&& rhs)
{
data = BOOST_FUSION_FWD_ELEM(T, rhs);
return *this;
}
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
map& operator=(map&& rhs)
{
data = std::move(rhs.data);
return *this;
}
#endif
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
FUSION_HASH endif
#endif
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
storage_type& get_data() { return data; }
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
@ -102,6 +145,8 @@ namespace boost { namespace fusion
};
}}
#undef FUSION_HASH
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
#pragma wave option(output: null)
#endif

View File

@ -8,15 +8,14 @@
#if !defined(FUSION_MAP_FORWARD_CTOR_07222005_0106)
#define FUSION_MAP_FORWARD_CTOR_07222005_0106
#include <boost/preprocessor/iterate.hpp>
#include <boost/preprocessor/repetition/enum_params.hpp>
#include <boost/preprocessor/repetition/enum_binary_params.hpp>
#define FUSION_FORWARD_CTOR_FORWARD(z, n, _) BOOST_FUSION_FWD_ELEM(U##n, _##n)
#define BOOST_PP_FILENAME_1 \
<boost/fusion/container/map/detail/cpp03/map_forward_ctor.hpp>
#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_MAP_SIZE)
#include BOOST_PP_ITERATE()
#undef FUSION_FORWARD_CTOR_FORWARD
#endif
#else // defined(BOOST_PP_IS_ITERATING)
///////////////////////////////////////////////////////////////////////////////
@ -34,6 +33,31 @@
map(BOOST_PP_ENUM_BINARY_PARAMS(N, typename detail::call_param<T, >::type arg))
: data(BOOST_PP_ENUM_PARAMS(N, arg)) {}
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
FUSION_HASH if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
#endif
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) || \
(defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES))
template <BOOST_PP_ENUM_PARAMS(N, typename U)>
BOOST_FUSION_GPU_ENABLED
#if N == 1
explicit
#endif
map(BOOST_PP_ENUM_BINARY_PARAMS(N, U, && arg)
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) && \
N == 1
// workaround for MSVC 10
FUSION_HASH if defined(BOOST_MSVC) && (BOOST_MSVC == 1700)
, typename enable_if<is_same<U0, T0> >::type* = 0
FUSION_HASH endif
#endif
)
: data(BOOST_PP_ENUM(N, FUSION_FORWARD_CTOR_FORWARD, arg)) {}
#endif
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
FUSION_HASH endif
#endif
#undef N
#endif // defined(BOOST_PP_IS_ITERATING)

View File

@ -163,4 +163,13 @@ namespace boost { namespace fusion
}}
#ifdef BOOST_FUSION_WORKAROUND_FOR_LWG_2408
namespace std
{
template <typename Seq, int Pos>
struct iterator_traits< ::boost::fusion::map_iterator<Seq, Pos> >
{ };
}
#endif
#endif

View File

@ -49,5 +49,14 @@ namespace boost { namespace fusion
};
}}
#ifdef BOOST_FUSION_WORKAROUND_FOR_LWG_2408
namespace std
{
template <typename Vector, int N>
struct iterator_traits< ::boost::fusion::vector_iterator<Vector, N> >
{ };
}
#endif
#endif