Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-19 09:47:39

0001 //  Copyright (c) 2001-2011 Hartmut Kaiser
0002 // 
0003 //  Distributed under the Boost Software License, Version 1.0. (See accompanying 
0004 //  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0005 
0006 #if !defined(BOOST_SPIRIT_KARMA_FORMAT_MANIP_AUTO_DEC_02_2009_1246PM)
0007 #define BOOST_SPIRIT_KARMA_FORMAT_MANIP_AUTO_DEC_02_2009_1246PM
0008 
0009 #if defined(_MSC_VER)
0010 #pragma once
0011 #endif
0012 
0013 #include <boost/spirit/home/karma/stream/detail/format_manip.hpp>
0014 #include <boost/spirit/home/karma/auto/create_generator.hpp>
0015 #include <boost/core/enable_if.hpp>
0016 #include <boost/mpl/bool.hpp>
0017 
0018 ///////////////////////////////////////////////////////////////////////////////
0019 namespace boost { namespace spirit { namespace karma { namespace detail
0020 {
0021     ///////////////////////////////////////////////////////////////////////////
0022     template <typename Expr>
0023     struct format<Expr
0024       , typename enable_if<traits::meta_create_exists<karma::domain, Expr> >::type>
0025     {
0026         typedef typename result_of::create_generator<Expr>::type expr_type;
0027         typedef format_manip<
0028             expr_type, mpl::true_, mpl::false_, unused_type, Expr
0029         > type;
0030 
0031         static type call(Expr const& expr)
0032         {
0033             return type(create_generator<Expr>(), unused, expr);
0034         }
0035     };
0036 
0037     ///////////////////////////////////////////////////////////////////////////
0038     template <typename Expr, typename Delimiter>
0039     struct format_delimited<Expr, Delimiter
0040       , typename enable_if<traits::meta_create_exists<karma::domain, Expr> >::type>
0041     {
0042         typedef typename result_of::create_generator<Expr>::type expr_type;
0043         typedef format_manip<
0044             expr_type, mpl::true_, mpl::false_, Delimiter, Expr
0045         > type;
0046 
0047         static type call(Expr const& expr
0048           , Delimiter const& delimiter
0049           , BOOST_SCOPED_ENUM(delimit_flag) pre_delimit)
0050         {
0051             return type(create_generator<Expr>(), delimiter, pre_delimit, expr);
0052         }
0053     };
0054 
0055 }}}}
0056 
0057 #endif