arg_router  1.4.0
C++ command line argument parsing and routing
arg_router::policy::validation::validator< Rules > Class Template Reference

#include <arg_router/policy/validator.hpp>

Public Types

using rules_type = std::tuple< Rules... >
 

Static Public Member Functions

template<typename Root >
constexpr static void validate () noexcept
 

Detailed Description

template<typename... Rules>
class arg_router::policy::validation::validator< Rules >

A policy that provides validation checking against a parse tree root.

The rules are checked in order, so where there is overlap (i.e. a policy or tree_node could be valid in multiple entries) be sure to list the more specific rule first.

Template Parameters
RulesA pack of rule types

Definition at line 106 of file validator.hpp.

Member Typedef Documentation

◆ rules_type

template<typename... Rules>
using arg_router::policy::validation::validator< Rules >::rules_type = std::tuple<Rules...>

Validation rules.

Definition at line 110 of file validator.hpp.

Member Function Documentation

◆ validate()

template<typename... Rules>
template<typename Root >
constexpr static void arg_router::policy::validation::validator< Rules >::validate ( )
inlinestaticconstexprnoexcept

Trigger the validation.

A static_assert will fail with a useful(ish) error message if validation fails.

Template Parameters
RootRoot type to validate

Definition at line 154 of file validator.hpp.


The documentation for this class was generated from the following file: