AUI Framework  master
Cross-platform base for C++ UI apps
Loading...
Searching...
No Matches
aui::ranged_number< UnderlyingType, min, max > Struct Template Reference

Clamps the possible values for a number to the specified range: [min;max]. More...

#include <AUI/Traits/values.h>

Public Member Functions#

 ranged_number (UnderlyingType value)
 
 operator UnderlyingType () const
 

Static Public Attributes#

static constexpr auto MIN = min
 
static constexpr auto MAX = max
 

Detailed Description#

template<aui::arithmetic UnderlyingType, auto min, auto max>
requires aui::convertible_to<decltype(min), UnderlyingType> && aui::convertible_to<decltype(max), UnderlyingType>
struct aui::ranged_number< UnderlyingType, min, max >
Template Parameters
UnderlyingTypeany arithmetic type
minminimum possible value
maxmaximum possible value