diff options
author | Tobias Markmann <tm@ayena.de> | 2014-10-19 20:22:58 (GMT) |
---|---|---|
committer | Tobias Markmann <tm@ayena.de> | 2014-10-20 13:49:33 (GMT) |
commit | 6b22dfcf59474dd016a0355a3102a1dd3692d92c (patch) | |
tree | 2b1fd33be433a91e81fee84fdc2bf1b52575d934 /3rdParty/Boost/src/boost/spirit/home/support/detail/hold_any.hpp | |
parent | 38b0cb785fea8eae5e48fae56440695fdfd10ee1 (diff) | |
download | swift-6b22dfcf59474dd016a0355a3102a1dd3692d92c.zip swift-6b22dfcf59474dd016a0355a3102a1dd3692d92c.tar.bz2 |
Update Boost in 3rdParty to version 1.56.0.
This updates Boost in our 3rdParty directory to version 1.56.0.
Updated our update.sh script to stop on error.
Changed error reporting in SwiftTools/CrashReporter.cpp to SWIFT_LOG due to
missing include of <iostream> with newer Boost.
Change-Id: I4b35c77de951333979a524097f35f5f83d325edc
Diffstat (limited to '3rdParty/Boost/src/boost/spirit/home/support/detail/hold_any.hpp')
-rw-r--r-- | 3rdParty/Boost/src/boost/spirit/home/support/detail/hold_any.hpp | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/3rdParty/Boost/src/boost/spirit/home/support/detail/hold_any.hpp b/3rdParty/Boost/src/boost/spirit/home/support/detail/hold_any.hpp index 4332fa2..f9a3ff1 100644 --- a/3rdParty/Boost/src/boost/spirit/home/support/detail/hold_any.hpp +++ b/3rdParty/Boost/src/boost/spirit/home/support/detail/hold_any.hpp @@ -98,7 +98,6 @@ namespace boost { namespace spirit } static void move(void* const* src, void** dest) { - reinterpret_cast<T*>(dest)->~T(); *reinterpret_cast<T*>(dest) = *reinterpret_cast<T const*>(src); } @@ -144,7 +143,6 @@ namespace boost { namespace spirit } static void move(void* const* src, void** dest) { - (*reinterpret_cast<T**>(dest))->~T(); **reinterpret_cast<T**>(dest) = **reinterpret_cast<T* const*>(src); } @@ -300,11 +298,25 @@ namespace boost { namespace spirit } // assignment operator +#ifdef BOOST_HAS_RVALUE_REFS + template <typename T> + basic_hold_any& operator=(T&& x) + { + return assign(std::forward<T>(x)); + } +#else + template <typename T> + basic_hold_any& operator=(T& x) + { + return assign(x); + } + template <typename T> basic_hold_any& operator=(T const& x) { return assign(x); } +#endif // utility functions basic_hold_any& swap(basic_hold_any& x) @@ -405,15 +417,6 @@ namespace boost { namespace spirit { typedef BOOST_DEDUCED_TYPENAME remove_reference<T>::type nonref; -#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - // If 'nonref' is still reference type, it means the user has not - // specialized 'remove_reference'. - - // Please use BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION macro - // to generate specialization of remove_reference for your class - // See type traits library documentation for details - BOOST_STATIC_ASSERT(!is_reference<nonref>::value); -#endif nonref* result = any_cast<nonref>(&operand); if(!result) @@ -426,11 +429,6 @@ namespace boost { namespace spirit { typedef BOOST_DEDUCED_TYPENAME remove_reference<T>::type nonref; -#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - // The comment in the above version of 'any_cast' explains when this - // assert is fired and what to do. - BOOST_STATIC_ASSERT(!is_reference<nonref>::value); -#endif return any_cast<nonref const&>(const_cast<basic_hold_any<Char> &>(operand)); } |