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/variant/detail/forced_return.hpp | |
parent | 38b0cb785fea8eae5e48fae56440695fdfd10ee1 (diff) | |
download | swift-contrib-6b22dfcf59474dd016a0355a3102a1dd3692d92c.zip swift-contrib-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/variant/detail/forced_return.hpp')
-rw-r--r-- | 3rdParty/Boost/src/boost/variant/detail/forced_return.hpp | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/3rdParty/Boost/src/boost/variant/detail/forced_return.hpp b/3rdParty/Boost/src/boost/variant/detail/forced_return.hpp index cc1f25b..522b796 100644 --- a/3rdParty/Boost/src/boost/variant/detail/forced_return.hpp +++ b/3rdParty/Boost/src/boost/variant/detail/forced_return.hpp @@ -17,10 +17,6 @@ #include "boost/variant/detail/generic_result_type.hpp" #include "boost/assert.hpp" -#if !defined(BOOST_MSVC) && !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) -# include "boost/type_traits/remove_reference.hpp" -#endif - namespace boost { namespace detail { namespace variant { @@ -32,24 +28,22 @@ namespace detail { namespace variant { // #if !defined(BOOST_MSVC) \ - && !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ && !defined(BOOST_NO_VOID_RETURNS) // "standard" implementation: template <typename T> -inline T forced_return( BOOST_EXPLICIT_TEMPLATE_TYPE(T) ) +inline T forced_return() { // logical error: should never be here! (see above) BOOST_ASSERT(false); - typedef typename boost::remove_reference<T>::type basic_type; - basic_type* dummy = 0; - return *static_cast< basic_type* >(dummy); + T (*dummy_function_ptr)() = 0; + return dummy_function_ptr(); } template <> -inline void forced_return<void>( BOOST_EXPLICIT_TEMPLATE_TYPE_SPEC(void) ) +inline void forced_return<void>() { // logical error: should never be here! (see above) BOOST_ASSERT(false); @@ -66,7 +60,7 @@ inline void forced_return<void>( BOOST_EXPLICIT_TEMPLATE_TYPE_SPEC(void) ) template <typename T> inline BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(T) -forced_return( BOOST_EXPLICIT_TEMPLATE_TYPE(T) ) +forced_return() { // logical error: should never be here! (see above) BOOST_ASSERT(false); @@ -77,6 +71,8 @@ forced_return( BOOST_EXPLICIT_TEMPLATE_TYPE(T) ) #else // defined(BOOST_MSVC) +# pragma warning( push ) +# pragma warning( disable : 4702 ) // unreachable code // msvc-specific implementation // // Leverages __declspec(noreturn) for optimized implementation. @@ -88,7 +84,7 @@ inline void forced_return_no_return() {}; template <typename T> inline BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(T) -forced_return( BOOST_EXPLICIT_TEMPLATE_TYPE(T) ) +forced_return() { // logical error: should never be here! (see above) BOOST_ASSERT(false); @@ -96,6 +92,8 @@ forced_return( BOOST_EXPLICIT_TEMPLATE_TYPE(T) ) forced_return_no_return(); } +# pragma warning( pop ) + #endif // BOOST_MSVC optimization }} // namespace detail::variant |