1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

compat: "requires" is a C++20 reserved keyword

Signed-off-by: Steffen Vogel <post@steffenvogel.de>
This commit is contained in:
Steffen Vogel 2024-03-27 11:58:22 +01:00 committed by pipeacosta
parent 688e8fac82
commit bff487038f

View file

@ -1306,16 +1306,16 @@ public:
#if __cplusplus <= 201703L
/// Sets required options \deprecated
Option *requires(Option *opt) { return needs(opt); }
Option *set_requires(Option *opt) { return needs(opt); }
/// Can find a string if needed \deprecated
template <typename T = App> Option *requires(std::string opt_name) {
template <typename T = App> Option *set_requires(std::string opt_name) {
return needs<T>(opt_name);
}
/// Any number supported, any mix of string and Opt \deprecated
template <typename A, typename B, typename... ARG>
Option *requires(A opt, B opt1, ARG... args) {
Option *set_requires(A opt, B opt1, ARG... args) {
needs(opt);
return needs(opt1, args...);
}