File indexing completed on 2025-01-19 09:47:37
0001
0002
0003
0004
0005
0006 #if !defined(BOOST_SPIRIT_KARMA_BOOL_UTILS_SEP_28_2009_0644PM)
0007 #define BOOST_SPIRIT_KARMA_BOOL_UTILS_SEP_28_2009_0644PM
0008
0009 #if defined(_MSC_VER)
0010 #pragma once
0011 #endif
0012
0013 #include <boost/spirit/home/support/char_class.hpp>
0014 #include <boost/spirit/home/support/unused.hpp>
0015 #include <boost/spirit/home/karma/detail/generate_to.hpp>
0016 #include <boost/spirit/home/karma/detail/string_generate.hpp>
0017 #include <boost/spirit/home/karma/numeric/detail/numeric_utils.hpp>
0018 #include <boost/detail/workaround.hpp>
0019
0020 namespace boost { namespace spirit { namespace karma
0021 {
0022
0023
0024
0025
0026
0027
0028
0029 template <typename T>
0030 struct bool_policies;
0031
0032 template <typename T
0033 , typename Policies = bool_policies<T>
0034 , typename CharEncoding = unused_type
0035 , typename Tag = unused_type>
0036 struct bool_inserter
0037 {
0038 template <typename OutputIterator, typename U>
0039 static bool
0040 call (OutputIterator& sink, U b, Policies const& p = Policies())
0041 {
0042 #if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1600))
0043 (void)p;
0044 #endif
0045 return p.template call<bool_inserter>(sink, T(b), p);
0046 }
0047
0048
0049
0050
0051 template <typename OutputIterator, typename U>
0052 static bool
0053 call_n (OutputIterator& sink, U b, Policies const& p)
0054 {
0055 #if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1600))
0056 (void)p;
0057 #endif
0058 if (b)
0059 return p.template generate_true<CharEncoding, Tag>(sink, b);
0060 return p.template generate_false<CharEncoding, Tag>(sink, b);
0061 }
0062 };
0063
0064 }}}
0065
0066 #endif
0067