same_type.hpp 942 B

12345678910111213141516171819202122232425262728293031323334353637
  1. // Boost.TypeErasure library
  2. //
  3. // Copyright 2011 Steven Watanabe
  4. //
  5. // Distributed under the Boost Software License Version 1.0. (See
  6. // accompanying file LICENSE_1_0.txt or copy at
  7. // http://www.boost.org/LICENSE_1_0.txt)
  8. //
  9. // $Id$
  10. #ifndef BOOST_TYPE_ERASURE_SAME_TYPE_HPP_INCLUDED
  11. #define BOOST_TYPE_ERASURE_SAME_TYPE_HPP_INCLUDED
  12. namespace boost {
  13. namespace type_erasure {
  14. /**
  15. * A built in concept that indicates that two
  16. * types are the same. Either T or U or both
  17. * can be placeholders.
  18. *
  19. * \warning Any number of instances of @ref deduced
  20. * can be connected with @ref same_type, but there
  21. * should be at most one regular placeholder in
  22. * the group. same_type<_a, _b> is not allowed.
  23. * The reason for this is that the library needs
  24. * to normalize all the placeholders, and in this
  25. * context there is no way to decide whether to
  26. * use @ref _a or @ref _b.
  27. */
  28. template<class T, class U>
  29. struct same_type {};
  30. }
  31. }
  32. #endif