Fix build with Boost 1.78 and 1.79

Up to Boost 1.77, it was enough to just call this from the `on_success`
handler:

 _pass(context) = false;

...and the spirit-x3 core would auto-revert the iterators. The sky was
pink and the unicorns were flying with their horns upright. Starting
with 1.78, though, the auto-reposition of the input iterators was
removed, which necessitated resetting them by hand. However, this
required casting away the constness of the `after` iterator because the
function signature was just wrong, passing a non-const iterator
reference for the `before` iterator (which we do not need to modify),
and a const one for the `after` iterator that we do want to modify.
Functions with a non-const reference to the `after` iterator wouldbe
silently ignored ("hey, it's just a function that I'm not calling, no
***** given").

That was fixed in 1.80, but we want to make sure that we work on the
latest Fedora which only has Boost 1.78, even though upstream already
released Boost 1.82.

Fix that by using `const` function signatures, but cast that const away
at runtime.

Also for consistency, always overwrite that iterator whenever rejecting
the input -- no matter whether the current version of Boost needs it or
not, and even in cases where the previous version of code would "just"
reject parsing, but keep the after iterator on its new value.

Bug: https://github.com/boostorg/spirit/pull/711
Bug: https://github.com/boostorg/spirit/issues/703
Fixes: 5b8e2825 Fix for Boost 1.78
Change-Id: Ib603db643a086e0351a4d74082505329ab8944cb
1 file changed
tree: 7bdcac85e4fb66305be2d61f832324015e52cf6b
  1. .clang-format
  2. .gitmodules
  3. .zuul.yaml
  4. CMakeLists.txt
  5. Doxyfile.in
  6. LICENSE
  7. README.md
  8. ci/
  9. cmake/
  10. docs/
  11. src/
  12. tests/
README.md

Console interface to NETCONF servers

License Gerrit Zuul CI taiga.io

This program provides an interactive console for working with YANG data. It can connect to NETCONF servers, work as a standalone YANG data editor, or talk to sysrepo locally.

Installation

For building, one needs:

The build process uses CMake. A quick-and-dirty build with no fancy options can be as simple as mkdir build && cd build && cmake .. && make && make install.

Bug Reporting

Issue reporting and feature requests are welcome via Taiga.io.

Development

We are using Gerrit for patch submission, code review and Continuous Integration (CI). A quick introduction is recommended for first-time Gerrit users. Choose CESNET - Sign in with GitHub for login. Development roadmap and planning happens over Taiga.io.

Credits

Copyright © CESNET, https://www.cesnet.cz/ . Portions copyright © Faculty of Information Technology, Czech Technical University in Prague, https://fit.cvut.cz/ . Most of the code was written by Václav Kubernát (CESNET, formerly FIT ČVUT) and Jan Kundrát (CESNET). The project is distributed under the terms of the Apache 2.0 license.