12 virtual void operator()(
const T& t)
const = 0;
15template <
typename T,
typename F>
18 explicit Validator(F f) : f_(std::move(f)) {}
20 void operator()(
const T& t)
const override { f_(t); }
29 void operator()(
const T&)
const override {}
32template <
typename T,
typename F>
33auto MakeValidator(F f) {
34 return Validator<T, F>(std::move(f));
38inline constexpr EmptyValidator<T> kEmptyValidator;