Validate a range
- Template Parameters
-
This is an example of how to use range
#include <fp/all.hpp>
void validate_int_step() {
const auto value = 14;
const auto result =
if (!result) {
fmt::print("{} failed fp::validate_range with result: {}\n", value, result);
} else {
fmt::print("{} passed fp::validate_range with result: {}\n", value, result);
}
}
void validate_double() {
const auto value = -2.1;
const auto result =
if (!result) {
fmt::print("{} failed fp::validate_range with result: {}\n", value, result);
} else {
fmt::print("{} passed fp::validate_range with result: {}\n", value, result);
}
}
int main() {
validate_int_step();
validate_double();
}