summaryrefslogtreecommitdiffstats
path: root/contrib/src/boost/type_traits/is_default_constructible.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/src/boost/type_traits/is_default_constructible.hpp')
-rw-r--r--contrib/src/boost/type_traits/is_default_constructible.hpp22
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>{};