COMMS
Template library intended to help with implementation of communication protocols.
Loading...
Searching...
No Matches
comms::option::def::ValidNumValueRange< TMinValue, TMaxValue > Struct Template Reference

#include "comms/options.h"

Detailed Description

template<std::intmax_t TMinValue, std::intmax_t TMaxValue>
struct comms::option::def::ValidNumValueRange< TMinValue, TMaxValue >

Provide range of valid numeric values.

Quite often numeric fields such as comms::field::IntValue or comms::field::EnumValue have limited number of valid values ranges. This option can be used multiple times to provide several valid ranges.
If values are too big to fit into std::intmax_t type, please use ValidBigUnsignedNumValueRange option instead.

Template Parameters
TMinValueMinimal valid numeric value
TMaxValueMaximal valid numeric value
Note
The intersection of the provided multiple ranges is NOT checked.
Warning
Some older compilers (gcc-4.7) fail to compile valid C++11 code that allows usage of multiple ValidNumValueRange options. If this is the case, please don't pass more than one ValidNumValueRange option.
See also
ValidNumValue
ValidBigUnsignedNumValueRange

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