1 // Copyright (c) 2001-2011 Hartmut Kaiser
3 // Distributed under the Boost Software License, Version 1.0. (See accompanying
4 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 #if !defined(BOOST_SPIRIT_KARMA_UNUSED_DELIMITER_MAR_15_2009_0923PM)
7 #define BOOST_SPIRIT_KARMA_UNUSED_DELIMITER_MAR_15_2009_0923PM
13 #include <boost/spirit/home/support/unused.hpp>
15 namespace boost { namespace spirit { namespace karma { namespace detail
17 template <typename Delimiter>
18 struct unused_delimiter : unused_type
20 unused_delimiter(Delimiter const& delim)
22 Delimiter const& delimiter;
24 // silence MSVC warning C4512: assignment operator could not be generated
25 BOOST_DELETED_FUNCTION(unused_delimiter& operator= (unused_delimiter const&))
28 // If a surrounding verbatim[] directive was specified, the current
29 // delimiter is of the type unused_delimiter. In this case we
30 // re-activate the delimiter which was active before the verbatim[]
32 template <typename Delimiter, typename Default>
33 inline Delimiter const&
34 get_delimiter(unused_delimiter<Delimiter> const& u, Default const&)
39 // If no surrounding verbatim[] directive was specified we activate
40 // a single space as the delimiter to use.
41 template <typename Delimiter, typename Default>
43 get_delimiter(Delimiter const&, Default const& d)