is_final.hpp 868 B

123456789101112131415161718192021222324252627282930
  1. // Copyright (c) 2014 Agustin Berge
  2. //
  3. // Use, modification and distribution are subject to the Boost Software License,
  4. // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
  5. // http://www.boost.org/LICENSE_1_0.txt).
  6. //
  7. // See http://www.boost.org/libs/type_traits for most recent version including documentation.
  8. #ifndef BOOST_TT_IS_FINAL_HPP_INCLUDED
  9. #define BOOST_TT_IS_FINAL_HPP_INCLUDED
  10. #include <boost/type_traits/intrinsics.hpp>
  11. #include <boost/type_traits/integral_constant.hpp>
  12. #ifdef BOOST_IS_FINAL
  13. #include <boost/type_traits/remove_cv.hpp>
  14. #endif
  15. namespace boost {
  16. #ifdef BOOST_IS_FINAL
  17. template <class T> struct is_final : public integral_constant<bool, BOOST_IS_FINAL(T)> {};
  18. #else
  19. template <class T> struct is_final : public integral_constant<bool, false> {};
  20. #endif
  21. } // namespace boost
  22. #endif // BOOST_TT_IS_FINAL_HPP_INCLUDED