19 template <boost::beast::http::verb... Vs>
struct VerbList {
25 constexpr
static std::array<boost::beast::http::verb,
sizeof...(Vs)>
values = {Vs...};
85 static_assert(Verbs::values.size() == methods.size());
100 constexpr
static long verb_to_idx(boost::beast::http::verb v) noexcept {
101 const auto it =
cexpr::find(Verbs::values.begin(), Verbs::values.end(), v);
102 return it != Verbs::values.end() ? std::distance(Verbs::values.begin(), it) : -1;
DependsOutcome
Definition: depends.hpp:11
virtual DependsOutcome query(const rapidjson::Value &obj)=0
virtual DependsOutcome alter(const rapidjson::Value &obj)=0
Definition: hdl_ctx.hpp:11
static constexpr std::array< boost::beast::http::verb, sizeof...(Vs)> values
Definition: base.hpp:25
static constexpr long verb_to_idx(boost::beast::http::verb v) noexcept
Definition: base.hpp:100
virtual DependsOutcome create(const rapidjson::Value &obj)=0
constexpr InputIt find(InputIt first, InputIt last, const T &value)
Definition: cexpr_algs.hpp:4
virtual DependsOutcome vacuum(const rapidjson::Value &obj)=0
constexpr HandlerMethods(HandlerContext &hc) noexcept
Definition: base.hpp:91