#include <array>
#include <functional>
#include <string_view>
#include <gsl/gsl>
#include "cexpr_algs.hpp"
#include "depends.hpp"
#include "json2virt.hpp"
#include "json_utils.hpp"
#include "utils.hpp"
Go to the source code of this file.
|
template<class F > |
auto | getCombinedFlags (const rapidjson::Value &json_flag, JsonRes &json_res) noexcept-> std::optional< F > |
|
#define PM_LIFT |
( |
|
mem_fn | ) |
[&](auto... args) { return mem_fn(args...); } |
template<class F >
auto getCombinedFlags |
( |
const rapidjson::Value & |
json_flag, |
|
|
JsonRes & |
json_res |
|
) |
| -> std::optional<F> |
|
noexcept |
constexpr auto action_scope |
Initial value:= [](auto&&... actions) {
using Arr = std::array<std::function<DependsOutcome()>, sizeof...(actions)>;
for (auto&& action : Arr{actions...}) {
return ao;
}
}
template<typename Flag >
constexpr const auto getFlag |
Initial value:= [](const rapidjson::Value& json_flag, auto error) {
if (auto v = Flag::from_string({json_flag.GetString(), json_flag.GetStringLength()}); v)
return std::optional{*v};
return error(301), std::optional<Flag>{std::nullopt};
}