type_traits.hpp 832 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. //
  2. // Copyright 2017-2019 Peter Dimov.
  3. //
  4. // Distributed under the Boost Software License, Version 1.0
  5. // See accompanying file LICENSE_1_0.txt or copy at
  6. // http://www.boost.org/LICENSE_1_0.txt
  7. //
  8. #ifndef BOOST_GIL_DETAIL_TYPE_TRAITS_HPP
  9. #define BOOST_GIL_DETAIL_TYPE_TRAITS_HPP
  10. #include <boost/config.hpp>
  11. #include <type_traits>
  12. namespace boost { namespace gil { namespace detail {
  13. #if defined(BOOST_LIBSTDCXX_VERSION) && BOOST_LIBSTDCXX_VERSION < 50100
  14. template<class T>
  15. struct is_trivially_default_constructible
  16. : std::integral_constant
  17. <
  18. bool,
  19. std::is_default_constructible<T>::value &&
  20. std::has_trivial_default_constructor<T>::value
  21. >
  22. {};
  23. #else
  24. using std::is_trivially_default_constructible;
  25. #endif
  26. using std::is_trivially_destructible;
  27. }}} //namespace boost::gil::detail
  28. #endif