has_default_constructor.hpp 935 B

1234567891011121314151617181920212223242526272829
  1. // (C) Copyright Matthias Troyerk 2006.
  2. // Use, modification and distribution are subject to the Boost Software License,
  3. // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
  4. // http://www.boost.org/LICENSE_1_0.txt).
  5. //
  6. // See http://www.boost.org/libs/type_traits for most recent version including documentation.
  7. #ifndef BOOST_DETAIL_HAS_DEFAULT_CONSTRUCTOR_HPP_INCLUDED
  8. #define BOOST_DETAIL_HAS_DEFAULT_CONSTRUCTOR_HPP_INCLUDED
  9. #include <boost/type_traits/has_trivial_constructor.hpp>
  10. namespace boost { namespace detail {
  11. /// type trait to check for a default constructor
  12. ///
  13. /// The default implementation just checks for a trivial constructor.
  14. /// Using some compiler magic it might be possible to provide a better default
  15. template <class T>
  16. struct has_default_constructor
  17. : public has_trivial_constructor<T>
  18. {};
  19. } } // namespace boost::detail
  20. #endif // BOOST_DETAIL_HAS_DEFAULT_CONSTRUCTOR_HPP_INCLUDED