commit | 385dcdd9be5b3c838a23c2035e0eaad72c0229a0 | [log] [tgz] |
---|---|---|
author | Václav Kubernát <kubernat@cesnet.cz> | Wed Nov 25 17:46:54 2020 +0100 |
committer | Václav Kubernát <kubernat@cesnet.cz> | Wed Nov 25 23:24:15 2020 +0100 |
tree | d119ace9cb9d4bfaacc80f28a44a36939dc2feeb | |
parent | 0745618db372792262e7fc65c13f7e42071dae74 [diff] |
Build with C++20 Asio needs a definition to build with C++20, link to bug in comment. The compiler also complained that it now needs full definition of enum_ inside in leaf_data_helpers.hpp:createEnum. One would think that that would be the case even before, because the lambda uses it in a context that requires full definition (i.e. creating an instance). However, the lambda is a generic lambda, which means it's a template. The C++ standard says (put very simply) "compilation of templates can be deferred until the end of a translation unit". And, because leaf_data_helpers is a header, it is possible that the definition enum_ comes in another included file after leaf_data_helpers.hpp, which means, by the time the compiler is compiling the generic lambda, it already has a definition for enum_. Now, in C++20, std::transform is constexpr. The standard says, that compilers can NOT use this deferring mechanic when dealing with constexpr function, so it needs the definition immediately, which means that ast_values.hpp has to be included inside leaf_data_helpers. This probably wouldn't have happened if I defined the function inside a cpp file (even clang-tidy warns for this). tl;dr: the generic lambda in createEnum didn't need the enum_ definition immediately, but now, std::transform is constexpr and that means the definition IS needed immediately https://timsong-cpp.github.io/cppwp/n4659/temp.point#8 is where it says about the templates. Thanks to PJBoy on freenode.#c++ for explaining this to me. Change-Id: I4675643572db37233a88f7a7ee3570fabb897dad
This program provides an interactive console for working with YANG data. It can connect to NETCONF servers, and also talk to sysrepo locally.
For building, one needs:
Use an exact commit of any dependencies as specified in submodules/dependencies/*
.
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
.
Issue reporting and feature requests are welcome via Taiga.io.
We are using Gerrit for patch submission, code review and Continuous Integration (CI). Development roadmap and planning happens over Taiga.io.
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.