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 27