1 // Copyright Daniel Wallin, David Abrahams 2005.
2 // Distributed under the Boost Software License, Version 1.0.
3 // (See accompanying file LICENSE_1_0.txt or copy at
4 // http://www.boost.org/LICENSE_1_0.txt)
6 #ifndef YESNO_050328_HPP
7 #define YESNO_050328_HPP
9 namespace boost { namespace parameter { namespace aux {
11 // types used with the "sizeof trick" to capture the results of
12 // overload resolution at compile-time.
14 typedef char (&no_tag)[2];
15 }}} // namespace boost::parameter::aux
17 #include <boost/mpl/bool.hpp>
19 namespace boost { namespace parameter { namespace aux {
21 // mpl::true_ and mpl::false_ are not distinguishable by sizeof(),
22 // so we pass them through these functions to get a type that is.
23 ::boost::parameter::aux::yes_tag to_yesno(::boost::mpl::true_);
24 ::boost::parameter::aux::no_tag to_yesno(::boost::mpl::false_);
25 }}} // namespace boost::parameter::aux
27 #include <boost/parameter/config.hpp>
29 #if defined(BOOST_PARAMETER_CAN_USE_MP11)
30 #include <boost/mp11/integral.hpp>
32 namespace boost { namespace parameter { namespace aux {
34 // mp11::mp_true and mp11::mp_false are not distinguishable by sizeof(),
35 // so we pass them through these functions to get a type that is.
36 ::boost::parameter::aux::yes_tag to_yesno(::boost::mp11::mp_true);
37 ::boost::parameter::aux::no_tag to_yesno(::boost::mp11::mp_false);
38 }}} // namespace boost::parameter::aux
40 #endif // BOOST_PARAMETER_CAN_USE_MP11
41 #endif // include guard