summaryrefslogtreecommitdiff
path: root/boost/parameter/aux_/yesno.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/parameter/aux_/yesno.hpp')
-rw-r--r--boost/parameter/aux_/yesno.hpp40
1 files changed, 28 insertions, 12 deletions
diff --git a/boost/parameter/aux_/yesno.hpp b/boost/parameter/aux_/yesno.hpp
index 13fa545a68..583c64abbc 100644
--- a/boost/parameter/aux_/yesno.hpp
+++ b/boost/parameter/aux_/yesno.hpp
@@ -1,26 +1,42 @@
-// Copyright Daniel Wallin, David Abrahams 2005. Use, modification and
-// distribution is subject to the Boost Software License, Version 1.0. (See
-// accompanying file LICENSE_1_0.txt or copy at
+// Copyright Daniel Wallin, David Abrahams 2005.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef YESNO_050328_HPP
#define YESNO_050328_HPP
+namespace boost { namespace parameter { namespace aux {
+
+ // types used with the "sizeof trick" to capture the results of
+ // overload resolution at compile-time.
+ typedef char yes_tag;
+ typedef char (&no_tag)[2];
+}}} // namespace boost::parameter::aux
+
#include <boost/mpl/bool.hpp>
namespace boost { namespace parameter { namespace aux {
-// types used with the "sizeof trick" to capture the results of
-// overload resolution at compile-time.
-typedef char yes_tag;
-typedef char (&no_tag)[2];
+ // mpl::true_ and mpl::false_ are not distinguishable by sizeof(),
+ // so we pass them through these functions to get a type that is.
+ ::boost::parameter::aux::yes_tag to_yesno(::boost::mpl::true_);
+ ::boost::parameter::aux::no_tag to_yesno(::boost::mpl::false_);
+}}} // namespace boost::parameter::aux
+
+#include <boost/parameter/config.hpp>
-// mpl::true_ and mpl::false_ are not distinguishable by sizeof(),
-// so we pass them through these functions to get a type that is.
-yes_tag to_yesno(mpl::true_);
-no_tag to_yesno(mpl::false_);
+#if defined(BOOST_PARAMETER_CAN_USE_MP11)
+#include <boost/mp11/integral.hpp>
+
+namespace boost { namespace parameter { namespace aux {
+ // mp11::mp_true and mp11::mp_false are not distinguishable by sizeof(),
+ // so we pass them through these functions to get a type that is.
+ ::boost::parameter::aux::yes_tag to_yesno(::boost::mp11::mp_true);
+ ::boost::parameter::aux::no_tag to_yesno(::boost::mp11::mp_false);
}}} // namespace boost::parameter::aux
-#endif // YESNO_050328_HPP
+#endif // BOOST_PARAMETER_CAN_USE_MP11
+#endif // include guard