Boost logo

Boost Users :

Subject: [Boost-users] Simple XML parser - error handling - line number
From: AndrzejB (borucki.andrzej_at_[hidden])
Date: 2018-06-29 18:43:30


I see tutorial sample:
https://www.boost.org/doc/libs/1_67_0/libs/spirit/example/qi/mini_xml3.cpp
<https://www.boost.org/doc/libs/1_67_0/libs/spirit/example/qi/mini_xml3.cpp>
                        on_error<fail>
                                (
                                        xml
                                        , std::cout
                                        << val("Error! Expecting ")
                                        << _4 // what failed?
                                        << val(" here: \"")
                                        << construct<std::string>(_3, _2) // iterators to error-pos, end
                                        << val("\"")
                                        << std::endl
                                        );
How print line number, or how print _2 and _3 . If I write _2 instead _4, is
compiler error.

--
Sent from: http://boost.2283326.n4.nabble.com/Boost-Users-f2553780.html

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net