Like the commenter said, use
query = id[
phx::try_ [
qi::_val = phx::bind(&test::from_string, qi::_1)
].catch_all [
qi::_pass = false
]
];
See it Live on Coliru
A version that compiles even with BOOST_SPIRIT_USE_PHOENIX_V3
: Live on Coliru
query = id[
phx::try_ [
qi::_val = phx::bind(&test::from_string, qi::_1)
].catch_all [
qi::_pass = false
],
qi::_pass = qi::_pass // to appease the spirit expression compilation gods
];