Line | |
---|
1 | //=======================================================================
|
---|
2 | // Copyright 1997, 1998, 1999, 2000 University of Notre Dame.
|
---|
3 | // Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek
|
---|
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 | #ifndef BOOST_GRAPH_DETAIL_IS_SAME_HPP
|
---|
10 | #define BOOST_GRAPH_DETAIL_IS_SAME_HPP
|
---|
11 |
|
---|
12 | #include <boost/pending/ct_if.hpp>
|
---|
13 |
|
---|
14 | namespace boost {
|
---|
15 | struct false_tag;
|
---|
16 | struct true_tag;
|
---|
17 |
|
---|
18 | namespace graph_detail {
|
---|
19 |
|
---|
20 | #if !defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
---|
21 | template <class U, class V>
|
---|
22 | struct is_same {
|
---|
23 | typedef boost::false_tag is_same_tag;
|
---|
24 | };
|
---|
25 | template <class U>
|
---|
26 | struct is_same<U, U> {
|
---|
27 | typedef boost::true_tag is_same_tag;
|
---|
28 | };
|
---|
29 | #else
|
---|
30 | template <class U, class V>
|
---|
31 | struct is_same {
|
---|
32 | enum { Unum = U::num, Vnum = V::num };
|
---|
33 | typedef typename boost::ct_if< (Unum == Vnum),
|
---|
34 | boost::true_tag, boost::false_tag>::type is_same_tag;
|
---|
35 | };
|
---|
36 | #endif
|
---|
37 | } // namespace graph_detail
|
---|
38 | } // namespace boost
|
---|
39 |
|
---|
40 | #endif
|
---|
Note: See
TracBrowser
for help on using the repository browser.