/*============================================================================= Copyright (c) 2001-2011 Hartmut Kaiser Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ #include #include #include #include #include #include #include #include "test.hpp" using namespace boost::spirit; using namespace boost::spirit::ascii; typedef spirit_test::output_iterator::type outiter_type; struct num_list : karma::grammar > { num_list() : num_list::base_type(start) { start = int_(1) << ',' << int_(0); } karma::rule > start; }; // this test must fail compiling as the rule is used with an incompatible // delimiter type int main() { std::string generated; std::back_insert_iterator outit(generated); num_list def; generate_delimited(outit, def, char_('%') << '\n'); return 0; }