Imported Upstream version 1.57.0
[platform/upstream/boost.git] / boost / type_erasure / same_type.hpp
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
11 #ifndef BOOST_TYPE_ERASURE_SAME_TYPE_HPP_INCLUDED
12 #define BOOST_TYPE_ERASURE_SAME_TYPE_HPP_INCLUDED
13
14 namespace boost {
15 namespace type_erasure {
16
17 /**
18  * A built in concept that indicates that two
19  * types are the same.  Either T or U or both
20  * can be placeholders.
21  *
22  * \warning Any number of instances of @ref deduced
23  * can be connected with @ref same_type, but there
24  * should be at most one regular placeholder in
25  * the group. same_type<_a, _b> is not allowed.
26  * The reason for this is that the library needs
27  * to normalize all the placeholders, and in this
28  * context there is no way to decide whether to
29  * use @ref _a or @ref _b.
30  */
31 template<class T, class U>
32 struct same_type {};
33
34 }
35 }
36
37 #endif