Functions which can fail due to bounds issues should use a consistent reporting mechanism. std::out_of_range is used by the STL for std::vector::at, which motivates using that consistently everywhere. However, constructing a dim with a runtime value inconsistent with the compile-time constant produces an assert.
Functions which can fail due to bounds issues should use a consistent reporting mechanism.
std::out_of_range
is used by the STL forstd::vector::at
, which motivates using that consistently everywhere. However, constructing a dim with a runtime value inconsistent with the compile-time constant produces an assert.