]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/spirit/test/karma/regression_semantic_action_attribute.cpp
import new upstream nautilus stable release 14.2.8
[ceph.git] / ceph / src / boost / libs / spirit / test / karma / regression_semantic_action_attribute.cpp
CommitLineData
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
7#include <boost/config/warning_disable.hpp>
8#include <boost/detail/lightweight_test.hpp>
9
10#include <string>
11#include <vector>
12#include <boost/spirit/include/karma.hpp>
92f5a8d4
TL
13#include <boost/spirit/include/phoenix_core.hpp>
14#include <boost/spirit/include/phoenix_operator.hpp>
7c673cae
FG
15
16#include "test.hpp"
17
18using namespace spirit_test;
19
20namespace karma = boost::spirit::karma;
21namespace phx = boost::phoenix;
22
23int main()
24{
25 using karma::int_;
26 using karma::_1;
27
28 BOOST_TEST(test("16909060", int_[ _1 = phx::val(0x01020304) ]));
29
30 // make sure the passed attribute type does not enforce the attribute type
31 // for the semantic action
32 unsigned char char_value = 8;
33 BOOST_TEST(test("16909060", int_[ _1 = phx::val(0x01020304) ], char_value));
34
35 return boost::report_errors();
36}