как заставить работать обработку ошибок для boost :: spirit

в boost :: spirit я добавил код обработки ошибок, основанный на примере roman.

#include 
#include 
#include 
#include 
#include 
#include 

#include 
#include 
#include 
#include 

namespace qi = boost::spirit::qi;
namespace ascii = boost::spirit::ascii;
namespace phoenix = boost::phoenix;

template 
struct roman : qi::grammar
{
  roman() : roman::base_type(start)
  {
    using qi::eps;
    using qi::lit;
    using qi::lexeme;
    using qi::_val;
    using qi::_1;
    using ascii::char_;

    // for on_error
    using qi::on_error;
    using qi::fail;
    using phoenix::construct;
    using phoenix::val;

    start = +(lit('M') )  >> "";

    on_error
    (
        start
      , std::cout
            < val("Error! Expecting ")
            // < _4                            // what failed?
            < val(" here: \"")
            // < construct

Ответы на вопрос(1)

Ваш ответ на вопрос