Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-16 09:59:19

0001 // Copyright Daniel Wallin, David Abrahams 2005.
0002 // Distributed under the Boost Software License, Version 1.0.
0003 // (See accompanying file LICENSE_1_0.txt or copy at
0004 // http://www.boost.org/LICENSE_1_0.txt)
0005 
0006 #ifndef BOOST_PARAMETER_AUX_YESNO_HPP
0007 #define BOOST_PARAMETER_AUX_YESNO_HPP
0008 
0009 namespace boost { namespace parameter { namespace aux {
0010 
0011     // types used with the "sizeof trick" to capture the results of
0012     // overload resolution at compile-time.
0013     typedef char yes_tag;
0014     typedef char (&no_tag)[2];
0015 }}} // namespace boost::parameter::aux
0016 
0017 #include <boost/mpl/bool.hpp>
0018 
0019 namespace boost { namespace parameter { namespace aux {
0020 
0021     // mpl::true_ and mpl::false_ are not distinguishable by sizeof(),
0022     // so we pass them through these functions to get a type that is.
0023     ::boost::parameter::aux::yes_tag to_yesno(::boost::mpl::true_);
0024     ::boost::parameter::aux::no_tag to_yesno(::boost::mpl::false_);
0025 }}} // namespace boost::parameter::aux
0026 
0027 #include <boost/parameter/config.hpp>
0028 
0029 #if defined(BOOST_PARAMETER_CAN_USE_MP11)
0030 #include <boost/mp11/integral.hpp>
0031 
0032 namespace boost { namespace parameter { namespace aux {
0033 
0034     // mp11::mp_true and mp11::mp_false are not distinguishable by sizeof(),
0035     // so we pass them through these functions to get a type that is.
0036     ::boost::parameter::aux::yes_tag to_yesno(::boost::mp11::mp_true);
0037     ::boost::parameter::aux::no_tag to_yesno(::boost::mp11::mp_false);
0038 }}} // namespace boost::parameter::aux
0039 
0040 #endif  // BOOST_PARAMETER_CAN_USE_MP11
0041 #endif  // include guard
0042