Back to home page

EIC code displayed by LXR

 
 

    


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

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_DETAIL_GENERATE_AUTO_DEC_01_2009_0743PM)
0007 #define BOOST_SPIRIT_KARMA_DETAIL_GENERATE_AUTO_DEC_01_2009_0743PM
0008 
0009 #if defined(_MSC_VER)
0010 #pragma once
0011 #endif
0012 
0013 #include <boost/spirit/home/karma/generate.hpp>
0014 #include <boost/spirit/home/karma/auto/create_generator.hpp>
0015 #include <boost/utility/enable_if.hpp>
0016 #include <boost/mpl/not.hpp>
0017 #include <boost/mpl/and.hpp>
0018 
0019 namespace boost { namespace spirit { namespace karma { namespace detail
0020 {
0021     ///////////////////////////////////////////////////////////////////////////
0022     template <typename Expr>
0023     struct generate_impl<Expr
0024       , typename enable_if<
0025             mpl::and_<
0026                 traits::meta_create_exists<karma::domain, Expr>
0027               , mpl::not_<traits::matches<karma::domain, Expr> > >
0028         >::type>
0029     {
0030         template <typename OutputIterator>
0031         static bool call(
0032             OutputIterator& sink
0033           , Expr const& expr)
0034         {
0035             return karma::generate(sink, create_generator<Expr>(), expr);
0036         }
0037     };
0038 
0039     ///////////////////////////////////////////////////////////////////////////
0040     template <typename Expr>
0041     struct generate_delimited_impl<Expr
0042       , typename enable_if<
0043             mpl::and_<
0044                 traits::meta_create_exists<karma::domain, Expr>
0045               , mpl::not_<traits::matches<karma::domain, Expr> > >
0046         >::type>
0047     {
0048         template <typename OutputIterator, typename Delimiter>
0049         static bool call(
0050             OutputIterator& sink
0051           , Expr const& expr
0052           , Delimiter const& delimiter
0053           , BOOST_SCOPED_ENUM(delimit_flag) pre_delimit)
0054         {
0055             return karma::generate_delimited(
0056                 sink, create_generator<Expr>(), delimiter, pre_delimit, expr);
0057         }
0058     };
0059 
0060 }}}}
0061 
0062 #endif
0063