diff --git a/include/boost/spirit/home/x3/directive/expect.hpp b/include/boost/spirit/home/x3/directive/expect.hpp index 879d92c2df..d5e7b19cd2 100644 --- a/include/boost/spirit/home/x3/directive/expect.hpp +++ b/include/boost/spirit/home/x3/directive/expect.hpp @@ -39,6 +39,7 @@ namespace boost { namespace spirit { namespace x3 { typedef unary_parser > base_type; static bool const is_pass_through_unary = true; + static bool const handles_container = Subject::handles_container; expect_directive(Subject const& subject) : base_type(subject) {} diff --git a/test/x3/expect.cpp b/test/x3/expect.cpp index 5061e104c0..9eb140504f 100644 --- a/test/x3/expect.cpp +++ b/test/x3/expect.cpp @@ -101,6 +101,13 @@ main() BOOST_TEST((at_c<1>(attr) == 'b')); BOOST_TEST((at_c<2>(attr) == 'c')); } + + { + std::string attr; + BOOST_TEST((test_attr("'azaaz'", + "'" > *(char_("a") | char_("z")) > "'", attr, space))); + BOOST_TEST(attr == "azaaz"); + } } {