forked from boostorg/type_traits
Fallback for is_nothrow_swappable on pre-C++11
This commit is contained in:
1 parent
1146f73070
commit
3e9608230c
3 files changed
+66
-14
No files matched your search
@@ -10,6 +10,20 @@
|
||||
#include <boost/config.hpp>
|
||||
|
||||
#if defined(BOOST_NO_SFINAE_EXPR) || defined(BOOST_NO_CXX11_NOEXCEPT) || defined(BOOST_NO_CXX11_DECLTYPE) || defined(BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS)
|
||||
|
||||
#include <boost/type_traits/is_scalar.hpp>
|
||||
#include <boost/type_traits/is_const.hpp>
|
||||
#include <boost/type_traits/integral_constant.hpp>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
template <class T> struct is_nothrow_swappable : boost::integral_constant<bool,
|
||||
boost::is_scalar<T>::value && !boost::is_const<T>::value> {};
|
||||
|
||||
template <class T, class U> struct is_nothrow_swappable_with : false_type {};
|
||||
template <class T> struct is_nothrow_swappable_with<T, T> : is_nothrow_swappable<T> {};
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
#include <boost/type_traits/declval.hpp>
|
||||
|
||||
Reference in new issue
Block a user