source: NonGTP/Boost/boost/parameter/aux_/yesno.hpp @ 857

Revision 857, 818 bytes checked in by igarcia, 18 years ago (diff)
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
11namespace boost { namespace parameter { namespace aux {
12
13// types used with the "sizeof trick" to capture the results of
14// overload resolution at compile-time.
15typedef char yes_tag;
16typedef 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.
20yes_tag to_yesno(mpl::true_);
21no_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.