is_same.hpp 788 B

123456789101112131415161718192021222324252627282930313233343536
  1. #ifndef BOOST_BIND_DETAIL_IS_SAME_HPP_INCLUDED
  2. #define BOOST_BIND_DETAIL_IS_SAME_HPP_INCLUDED
  3. // is_same<T1,T2>::value is true when T1 == T2
  4. //
  5. // Copyright 2014 Peter Dimov
  6. //
  7. // Distributed under the Boost Software License, Version 1.0.
  8. // See accompanying file LICENSE_1_0.txt or copy at
  9. // http://www.boost.org/LICENSE_1_0.txt
  10. #include <boost/config.hpp>
  11. #if defined(BOOST_HAS_PRAGMA_ONCE)
  12. # pragma once
  13. #endif
  14. namespace boost
  15. {
  16. namespace _bi
  17. {
  18. template< class T1, class T2 > struct is_same
  19. {
  20. BOOST_STATIC_CONSTANT( bool, value = false );
  21. };
  22. template< class T > struct is_same< T, T >
  23. {
  24. BOOST_STATIC_CONSTANT( bool, value = true );
  25. };
  26. } // namespace _bi
  27. } // namespace boost
  28. #endif // #ifndef BOOST_BIND_DETAIL_IS_SAME_HPP_INCLUDED