powerd++  0.4.4
Public Member Functions | Private Attributes | List of all members
utility::Min< T > Class Template Reference

A simple value container that provides the minimum of assigned values. More...

#include <utility.hpp>

Collaboration diagram for utility::Min< T >:
[legend]

Public Member Functions

constexpr Min (T const &value)
 Construct from an initial value. More...
 
constexpr operator T const & () const
 Returns the current minimum. More...
 
constexpr Minoperator= (T const &value)
 Assign a new value, if it is less than the current value. More...
 

Private Attributes

value
 The minimum of the assigned values.
 

Detailed Description

template<typename T>
class utility::Min< T >

A simple value container that provides the minimum of assigned values.

Template Parameters
TThe value type

Constructor & Destructor Documentation

◆ Min()

template<typename T >
constexpr utility::Min< T >::Min ( T const &  value)
inlineexplicitconstexpr

Construct from an initial value.

Parameters
valueThe initial value

Member Function Documentation

◆ operator T const &()

template<typename T >
constexpr utility::Min< T >::operator T const & ( ) const
inlineconstexpr

Returns the current minimum.

Returns
The minimum by const reference

◆ operator=()

template<typename T >
constexpr Min& utility::Min< T >::operator= ( T const &  value)
inlineconstexpr

Assign a new value, if it is less than the current value.

Parameters
valueThe value to assign
Returns
A self reference

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