diff options
author | Stefan Radomski <github@mintwerk.de> | 2017-01-13 11:58:41 (GMT) |
---|---|---|
committer | Stefan Radomski <github@mintwerk.de> | 2017-01-13 11:58:41 (GMT) |
commit | 0aa0fe08dc308c94379c47d0bf9745e341cb4c81 (patch) | |
tree | 514b009d3d1658af6988e059874014fc26fc0395 /contrib/src/boost/type_traits/is_default_constructible.hpp | |
parent | 6952ce94491e4b7bc2acded0788e4609ca2c76e8 (diff) | |
download | uscxml-0aa0fe08dc308c94379c47d0bf9745e341cb4c81.zip uscxml-0aa0fe08dc308c94379c47d0bf9745e341cb4c81.tar.gz uscxml-0aa0fe08dc308c94379c47d0bf9745e341cb4c81.tar.bz2 |
Updated boost headers
Diffstat (limited to 'contrib/src/boost/type_traits/is_default_constructible.hpp')
-rw-r--r-- | contrib/src/boost/type_traits/is_default_constructible.hpp | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/contrib/src/boost/type_traits/is_default_constructible.hpp b/contrib/src/boost/type_traits/is_default_constructible.hpp index 7fd63f8..fa5d76a 100644 --- a/contrib/src/boost/type_traits/is_default_constructible.hpp +++ b/contrib/src/boost/type_traits/is_default_constructible.hpp @@ -9,9 +9,14 @@ #ifndef BOOST_TT_IS_DEFAULT_CONSTRUCTIBLE_HPP_INCLUDED #define BOOST_TT_IS_DEFAULT_CONSTRUCTIBLE_HPP_INCLUDED +#include <cstddef> // size_t #include <boost/type_traits/integral_constant.hpp> #include <boost/detail/workaround.hpp> +#if BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40700) +#include <boost/type_traits/is_abstract.hpp> +#endif + #if !defined(BOOST_NO_CXX11_DECLTYPE) && !BOOST_WORKAROUND(BOOST_MSVC, < 1800) && !BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40500) #include <boost/type_traits/detail/yes_no_type.hpp> @@ -28,10 +33,25 @@ namespace boost{ template<typename> static boost::type_traits::no_type test(...); }; - +#if BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40700) + template<class T, bool b> + struct is_default_constructible_abstract_filter + { + static const bool value = sizeof(is_default_constructible_imp::test<T>(0)) == sizeof(boost::type_traits::yes_type); + }; + template<class T> + struct is_default_constructible_abstract_filter<T, true> + { + static const bool value = false; + }; +#endif } +#if BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40700) + template <class T> struct is_default_constructible : public integral_constant<bool, detail::is_default_constructible_abstract_filter<T, boost::is_abstract<T>::value>::value>{}; +#else template <class T> struct is_default_constructible : public integral_constant<bool, sizeof(detail::is_default_constructible_imp::test<T>(0)) == sizeof(boost::type_traits::yes_type)>{}; +#endif template <class T, std::size_t N> struct is_default_constructible<T[N]> : public is_default_constructible<T>{}; template <class T> struct is_default_constructible<T[]> : public is_default_constructible<T>{}; template <class T> struct is_default_constructible<T&> : public integral_constant<bool, false>{}; |