mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2024-12-23 21:25:49 +00:00
workaround for GCC4.8: remove non-trivial move ctor
This commit is contained in:
parent
d1d273a84a
commit
49243e6c94
2 changed files with 11 additions and 3 deletions
|
@ -98,11 +98,15 @@ namespace sprout {
|
|||
: init(v.init)
|
||||
, val(v.is_initialized() ? holder_type(*v) : holder_type())
|
||||
{}
|
||||
#if defined(__GNUC__) && (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ == 8 && __GNUC_PATCHLEVEL__ <= 1))
|
||||
SPROUT_CONSTEXPR optional(optional&&) = default;
|
||||
#else
|
||||
SPROUT_CONSTEXPR optional(optional&& v)
|
||||
SPROUT_NOEXCEPT_EXPR(std::is_nothrow_move_constructible<T>::value)
|
||||
: init(v.init)
|
||||
, val(v.is_initialized() ? holder_type(sprout::move(get(v))) : holder_type())
|
||||
{}
|
||||
#endif
|
||||
SPROUT_CONSTEXPR optional(T const& v)
|
||||
: init(true)
|
||||
, val(v)
|
||||
|
|
|
@ -42,7 +42,7 @@ namespace sprout {
|
|||
// : Head(v)
|
||||
// {}
|
||||
// template<typename UHead>
|
||||
// SPROUT_CONSTEXPR head_base(UHead&& v)
|
||||
// explicit SPROUT_CONSTEXPR head_base(UHead&& v)
|
||||
// : Head(sprout::forward<UHead>(v))
|
||||
// {}
|
||||
// };
|
||||
|
@ -65,7 +65,7 @@ namespace sprout {
|
|||
: head_(v)
|
||||
{}
|
||||
template<typename UHead>
|
||||
SPROUT_CONSTEXPR head_base(UHead&& v)
|
||||
explicit SPROUT_CONSTEXPR head_base(UHead&& v)
|
||||
: head_(sprout::forward<UHead>(v))
|
||||
{}
|
||||
};
|
||||
|
@ -88,7 +88,7 @@ namespace sprout {
|
|||
: head_(v)
|
||||
{}
|
||||
template<typename UHead>
|
||||
SPROUT_CONSTEXPR head_base(UHead&& v)
|
||||
explicit SPROUT_CONSTEXPR head_base(UHead&& v)
|
||||
: head_(sprout::forward<UHead>(v))
|
||||
{}
|
||||
};
|
||||
|
@ -176,11 +176,15 @@ namespace sprout {
|
|||
, base_type(sprout::forward<UHead>(h))
|
||||
{}
|
||||
SPROUT_CONSTEXPR tuple_impl(tuple_impl const&) = default;
|
||||
#if defined(__GNUC__) && (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ == 8 && __GNUC_PATCHLEVEL__ <= 1))
|
||||
SPROUT_CONSTEXPR tuple_impl(tuple_impl&&) = default;
|
||||
#else
|
||||
SPROUT_CONSTEXPR tuple_impl(tuple_impl&& t)
|
||||
SPROUT_NOEXCEPT_EXPR(std::is_nothrow_move_constructible<Head>::value && std::is_nothrow_move_constructible<inherited_type>::value)
|
||||
: inherited_type(sprout::move(tail(t)))
|
||||
, base_type(sprout::forward<Head>(head(t)))
|
||||
{}
|
||||
#endif
|
||||
template<typename... UTypes>
|
||||
SPROUT_CONSTEXPR tuple_impl(tuple_impl<Index, UTypes...> const& t)
|
||||
: inherited_type(sprout::tuples::detail::tuple_impl<Index, UTypes...>::tail(t))
|
||||
|
|
Loading…
Reference in a new issue