1
2#ifndef BOOST_MPL_AUX_YES_NO_HPP_INCLUDED
3#define BOOST_MPL_AUX_YES_NO_HPP_INCLUDED
4
5// Copyright Aleksey Gurtovoy 2000-2004
6//
7// Distributed under the Boost Software License, Version 1.0.
8// (See accompanying file LICENSE_1_0.txt or copy at
9// http://www.boost.org/LICENSE_1_0.txt)
10//
11// See http://www.boost.org/libs/mpl for documentation.
12
13// $Id$
14// $Date$
15// $Revision$
16
17#include <boost/mpl/aux_/nttp_decl.hpp>
18#include <boost/mpl/aux_/config/arrays.hpp>
19#include <boost/mpl/aux_/config/msvc.hpp>
20#include <boost/mpl/aux_/config/workaround.hpp>
21#include <cstddef>
22
23
24namespace boost { namespace mpl { namespace aux {
25
26typedef char (&no_tag)[1];
27typedef char (&yes_tag)[2];
28
29template< bool C_ > struct yes_no_tag
30{
31 typedef no_tag type;
32};
33
34template<> struct yes_no_tag<true>
35{
36 typedef yes_tag type;
37};
38
39
40template< BOOST_MPL_AUX_NTTP_DECL(std::size_t, n) > struct weighted_tag
41{
42#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300)
43 typedef char (&type)[n];
44#else
45 char buf[n];
46 typedef weighted_tag type;
47#endif
48};
49
50#if defined(BOOST_MPL_CFG_NO_DEPENDENT_ARRAY_TYPES)
51template<> struct weighted_tag<0>
52{
53 typedef char (&type)[1];
54};
55#endif
56
57}}}
58
59#endif // BOOST_MPL_AUX_YES_NO_HPP_INCLUDED
60