src/cxx_supportlib/vendor-modified/boost/optional/optional.hpp in passenger-6.0.7 vs src/cxx_supportlib/vendor-modified/boost/optional/optional.hpp in passenger-6.0.8
- old
+ new
@@ -775,11 +775,11 @@
storage_type m_storage ;
} ;
#include <boost/optional/detail/optional_trivially_copyable_base.hpp>
-// definition of metafunciton is_optional_val_init_candidate
+// definition of metafunction is_optional_val_init_candidate
template <typename U>
struct is_optional_related
: boost::conditional< boost::is_base_of<optional_detail::optional_tag, BOOST_DEDUCED_TYPENAME boost::decay<U>::type>::value
|| boost::is_same<BOOST_DEDUCED_TYPENAME boost::decay<U>::type, none_t>::value
|| boost::is_same<BOOST_DEDUCED_TYPENAME boost::decay<U>::type, in_place_init_t>::value
@@ -811,13 +811,18 @@
struct is_optional_constructible : boost::true_type
{};
#endif // is_convertible condition
-template <typename T, typename U>
+template <typename T, typename U, bool = is_optional_related<U>::value>
struct is_optional_val_init_candidate
- : boost::conditional< !is_optional_related<U>::value && is_convertible_to_T_or_factory<T, U>::value
+ : boost::false_type
+{};
+
+template <typename T, typename U>
+struct is_optional_val_init_candidate<T, U, false>
+ : boost::conditional< is_convertible_to_T_or_factory<T, U>::value
, boost::true_type, boost::false_type>::type
{};
} // namespace optional_detail
@@ -965,10 +970,10 @@
#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
// Creates a deep move of another optional<T>
// Can throw if T::T(T&&) does
#ifndef BOOST_OPTIONAL_DETAIL_NO_DEFAULTED_MOVE_FUNCTIONS
- optional ( optional && rhs ) = default;
+ optional ( optional && ) = default;
#else
optional ( optional && rhs )
BOOST_NOEXCEPT_IF(::boost::is_nothrow_move_constructible<T>::value)
: base( boost::move(rhs) )
{}