Last change
on this file since 12 was
12,
checked in by landauf, 17 years ago
|
added boost
|
-
Property svn:executable set to
*
|
File size:
792 bytes
|
Line | |
---|
1 | // Copyright Daniel Wallin, David Abrahams 2005. Use, modification and |
---|
2 | // distribution is subject to the Boost Software License, Version 1.0. (See |
---|
3 | // accompanying file LICENSE_1_0.txt or copy at |
---|
4 | // http://www.boost.org/LICENSE_1_0.txt) |
---|
5 | |
---|
6 | #ifndef YESNO_050328_HPP |
---|
7 | #define YESNO_050328_HPP |
---|
8 | |
---|
9 | #include <boost/mpl/bool.hpp> |
---|
10 | |
---|
11 | namespace boost { namespace parameter { namespace aux { |
---|
12 | |
---|
13 | // types used with the "sizeof trick" to capture the results of |
---|
14 | // overload resolution at compile-time. |
---|
15 | typedef char yes_tag; |
---|
16 | typedef char (&no_tag)[2]; |
---|
17 | |
---|
18 | // mpl::true_ and mpl::false_ are not distinguishable by sizeof(), |
---|
19 | // so we pass them through these functions to get a type that is. |
---|
20 | yes_tag to_yesno(mpl::true_); |
---|
21 | no_tag to_yesno(mpl::false_); |
---|
22 | |
---|
23 | }}} // namespace boost::parameter::aux |
---|
24 | |
---|
25 | #endif // YESNO_050328_HPP |
---|
26 | |
---|
Note: See
TracBrowser
for help on using the repository browser.