kblib 0.2.3
General utilities library for modern C++
kblib::nums::min_t Struct Reference

Shorthand for std::numeric_limits::min() More...

#include <kblib/stats.h>

Public Member Functions

template<typename T , enable_if_t< std::numeric_limits< T >::is_specialized, void > * = nullptr>
constexpr operator T () const noexcept(noexcept(std::numeric_limits< T >::min()))
 
template<typename L , typename R >
constexpr auto operator() (L &&lhs, R &&rhs) const noexcept -> decltype(auto)
 Returns the smaller of two values. Returns rhs if equal. More...
 

Static Public Member Functions

template<typename T >
static constexpr auto of () noexcept(noexcept(std::numeric_limits< T >::min()))
 

Friends

template<typename T >
constexpr friend auto operator== (T t, min_t) -> bool
 
template<typename T >
constexpr friend auto operator== (min_t, T t) -> bool
 
template<typename T >
constexpr friend auto operator!= (T t, min_t) -> bool
 
template<typename T >
constexpr friend auto operator!= (min_t, T t) -> bool
 
template<typename T >
constexpr friend auto operator< (T t, min_t) -> bool
 
template<typename T >
constexpr friend auto operator< (min_t, T t) -> bool
 
template<typename T >
constexpr friend auto operator> (T t, min_t) -> bool
 
template<typename T >
constexpr friend auto operator> (min_t, T t) -> bool
 
template<typename T >
constexpr friend auto operator<= (T t, min_t) -> bool
 
template<typename T >
constexpr friend auto operator<= (min_t, T t) -> bool
 
template<typename T >
constexpr friend auto operator>= (T t, min_t) -> bool
 
template<typename T >
constexpr friend auto operator>= (min_t, T t) -> bool
 
constexpr friend auto operator== (min_t, min_t) -> std::true_type
 
constexpr friend auto operator!= (min_t, min_t) -> std::false_type
 
constexpr friend auto operator< (min_t, min_t) -> std::false_type
 
constexpr friend auto operator> (min_t, min_t) -> std::false_type
 
constexpr friend auto operator<= (min_t, min_t) -> std::true_type
 
constexpr friend auto operator>= (min_t, min_t) -> std::true_type
 
constexpr friend auto operator== (max_t, min_t) -> std::false_type
 
constexpr friend auto operator== (min_t, max_t) -> std::false_type
 
constexpr friend auto operator!= (max_t, min_t) -> std::true_type
 
constexpr friend auto operator!= (min_t, max_t) -> std::true_type
 
constexpr friend auto operator< (max_t, min_t) -> std::false_type
 
constexpr friend auto operator< (min_t, max_t) -> std::true_type
 
constexpr friend auto operator> (max_t, min_t) -> std::true_type
 
constexpr friend auto operator> (min_t, max_t) -> std::false_type
 
constexpr friend auto operator<= (max_t, min_t) -> std::false_type
 
constexpr friend auto operator<= (min_t, max_t) -> std::true_type
 
constexpr friend auto operator>= (max_t, min_t) -> std::true_type
 
constexpr friend auto operator>= (min_t, max_t) -> std::false_type
 

Detailed Description

Shorthand for std::numeric_limits::min()

Implicitly converts to the minimum representable value of any numeric type. For unsigned destination types, this is always 0. For signed destination types, it depends on size.

Also serves as a min(a, b) function object.

Definition at line 306 of file stats.h.

Member Function Documentation

◆ of()

template<typename T >
static constexpr auto kblib::nums::min_t::of ( )
inlinestaticconstexprnoexcept

Definition at line 314 of file stats.h.

◆ operator T()

template<typename T , enable_if_t< std::numeric_limits< T >::is_specialized, void > * = nullptr>
constexpr kblib::nums::min_t::operator T ( ) const
inlineconstexprnoexcept

Definition at line 309 of file stats.h.

◆ operator()()

template<typename L , typename R >
constexpr auto kblib::nums::min_t::operator() ( L &&  lhs,
R &&  rhs 
) const -> decltype(auto)
inlineconstexprnoexcept

Returns the smaller of two values. Returns rhs if equal.

Definition at line 323 of file stats.h.

Friends And Related Function Documentation

◆ operator!= [1/5]

constexpr friend auto operator!= ( max_t  ,
min_t   
) -> std::true_type
friend

Definition at line 413 of file stats.h.

◆ operator!= [2/5]

constexpr friend auto operator!= ( min_t  ,
max_t   
) -> std::true_type
friend

Definition at line 417 of file stats.h.

◆ operator!= [3/5]

constexpr friend auto operator!= ( min_t  ,
min_t   
) -> std::false_type
friend

Definition at line 384 of file stats.h.

◆ operator!= [4/5]

template<typename T >
constexpr friend auto operator!= ( min_t  ,
t 
) -> bool
friend

Definition at line 342 of file stats.h.

◆ operator!= [5/5]

template<typename T >
constexpr friend auto operator!= ( t,
min_t   
) -> bool
friend

Definition at line 338 of file stats.h.

◆ operator< [1/5]

constexpr friend auto operator< ( max_t  ,
min_t   
) -> std::false_type
friend

Definition at line 421 of file stats.h.

◆ operator< [2/5]

constexpr friend auto operator< ( min_t  ,
max_t   
) -> std::true_type
friend

Definition at line 425 of file stats.h.

◆ operator< [3/5]

constexpr friend auto operator< ( min_t  ,
min_t   
) -> std::false_type
friend

Definition at line 388 of file stats.h.

◆ operator< [4/5]

template<typename T >
constexpr friend auto operator< ( min_t  ,
t 
) -> bool
friend

Definition at line 351 of file stats.h.

◆ operator< [5/5]

template<typename T >
constexpr friend auto operator< ( t,
min_t   
) -> bool
friend

Definition at line 347 of file stats.h.

◆ operator<= [1/5]

constexpr friend auto operator<= ( max_t  ,
min_t   
) -> std::false_type
friend

Definition at line 437 of file stats.h.

◆ operator<= [2/5]

constexpr friend auto operator<= ( min_t  ,
max_t   
) -> std::true_type
friend

Definition at line 441 of file stats.h.

◆ operator<= [3/5]

constexpr friend auto operator<= ( min_t  ,
min_t   
) -> std::true_type
friend

Definition at line 396 of file stats.h.

◆ operator<= [4/5]

template<typename T >
constexpr friend auto operator<= ( min_t  ,
t 
) -> bool
friend

Definition at line 368 of file stats.h.

◆ operator<= [5/5]

template<typename T >
constexpr friend auto operator<= ( t,
min_t   
) -> bool
friend

Definition at line 364 of file stats.h.

◆ operator== [1/5]

constexpr friend auto operator== ( max_t  ,
min_t   
) -> std::false_type
friend

Definition at line 405 of file stats.h.

◆ operator== [2/5]

constexpr friend auto operator== ( min_t  ,
max_t   
) -> std::false_type
friend

Definition at line 409 of file stats.h.

◆ operator== [3/5]

constexpr friend auto operator== ( min_t  ,
min_t   
) -> std::true_type
friend

Definition at line 380 of file stats.h.

◆ operator== [4/5]

template<typename T >
constexpr friend auto operator== ( min_t  ,
t 
) -> bool
friend

Definition at line 334 of file stats.h.

◆ operator== [5/5]

template<typename T >
constexpr friend auto operator== ( t,
min_t   
) -> bool
friend

Definition at line 330 of file stats.h.

◆ operator> [1/5]

constexpr friend auto operator> ( max_t  ,
min_t   
) -> std::true_type
friend

Definition at line 429 of file stats.h.

◆ operator> [2/5]

constexpr friend auto operator> ( min_t  ,
max_t   
) -> std::false_type
friend

Definition at line 433 of file stats.h.

◆ operator> [3/5]

constexpr friend auto operator> ( min_t  ,
min_t   
) -> std::false_type
friend

Definition at line 392 of file stats.h.

◆ operator> [4/5]

template<typename T >
constexpr friend auto operator> ( min_t  ,
t 
) -> bool
friend

Definition at line 359 of file stats.h.

◆ operator> [5/5]

template<typename T >
constexpr friend auto operator> ( t,
min_t   
) -> bool
friend

Definition at line 355 of file stats.h.

◆ operator>= [1/5]

constexpr friend auto operator>= ( max_t  ,
min_t   
) -> std::true_type
friend

Definition at line 445 of file stats.h.

◆ operator>= [2/5]

constexpr friend auto operator>= ( min_t  ,
max_t   
) -> std::false_type
friend

Definition at line 449 of file stats.h.

◆ operator>= [3/5]

constexpr friend auto operator>= ( min_t  ,
min_t   
) -> std::true_type
friend

Definition at line 400 of file stats.h.

◆ operator>= [4/5]

template<typename T >
constexpr friend auto operator>= ( min_t  ,
t 
) -> bool
friend

Definition at line 376 of file stats.h.

◆ operator>= [5/5]

template<typename T >
constexpr friend auto operator>= ( t,
min_t   
) -> bool
friend

Definition at line 372 of file stats.h.


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