Back to home page

EIC code displayed by LXR

 
 

    


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

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_UNUSED_DELIMITER_MAR_15_2009_0923PM)
0007 #define BOOST_SPIRIT_KARMA_UNUSED_DELIMITER_MAR_15_2009_0923PM
0008 
0009 #if defined(_MSC_VER)
0010 #pragma once
0011 #endif
0012 
0013 #include <boost/spirit/home/support/unused.hpp>
0014 
0015 namespace boost { namespace spirit { namespace karma { namespace detail
0016 {
0017 #ifdef _MSC_VER
0018 #  pragma warning(push)
0019 #  pragma warning(disable: 4512) // assignment operator could not be generated.
0020 #endif
0021     template <typename Delimiter>
0022     struct unused_delimiter : unused_type
0023     {
0024         unused_delimiter(Delimiter const& delim)
0025           : delimiter(delim) {}
0026         Delimiter const& delimiter;
0027     };
0028 #ifdef _MSC_VER
0029 #  pragma warning(pop)
0030 #endif
0031 
0032     // If a surrounding verbatim[] directive was specified, the current
0033     // delimiter is of the type unused_delimiter. In this case we 
0034     // re-activate the delimiter which was active before the verbatim[]
0035     // directive.
0036     template <typename Delimiter, typename Default>
0037     inline Delimiter const& 
0038     get_delimiter(unused_delimiter<Delimiter> const& u, Default const&)
0039     {
0040         return u.delimiter;
0041     }
0042 
0043     // If no surrounding verbatim[] directive was specified we activate
0044     // a single space as the delimiter to use.
0045     template <typename Delimiter, typename Default>
0046     inline Default const& 
0047     get_delimiter(Delimiter const&, Default const& d)
0048     {
0049         return d;
0050     }
0051 
0052 }}}}
0053 
0054 #endif