]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | // Copyright (c) 2010 Michael Caisse |
2 | // Copyright (c) 2001-2010 Hartmut Kaiser | |
3 | // | |
4 | // Distributed under the Boost Software License, Version 1.0. (See accompanying | |
5 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) | |
6 | ||
7c673cae FG |
7 | #include <string> |
8 | #include <vector> | |
9 | #include <boost/spirit/include/karma.hpp> | |
1e59de90 TL |
10 | #include <boost/phoenix/core.hpp> |
11 | #include <boost/phoenix/operator.hpp> | |
7c673cae FG |
12 | |
13 | #include "test.hpp" | |
14 | ||
15 | using namespace spirit_test; | |
16 | ||
17 | namespace karma = boost::spirit::karma; | |
18 | namespace phx = boost::phoenix; | |
19 | ||
20 | int main() | |
21 | { | |
22 | using karma::int_; | |
23 | using karma::_1; | |
24 | ||
25 | BOOST_TEST(test("16909060", int_[ _1 = phx::val(0x01020304) ])); | |
26 | ||
27 | // make sure the passed attribute type does not enforce the attribute type | |
28 | // for the semantic action | |
29 | unsigned char char_value = 8; | |
30 | BOOST_TEST(test("16909060", int_[ _1 = phx::val(0x01020304) ], char_value)); | |
31 | ||
32 | return boost::report_errors(); | |
33 | } |