tfel
Loading...
Searching...
No Matches
tfel::math::internals::QuantityValueOwnershipPolicy< ValueType, AllowImplicitConversion > Struct Template Reference

an helper structure which holds the value internally. More...

Public Member Functions

constexpr QuantityValueOwnershipPolicy () noexcept
 default constructor
constexpr QuantityValueOwnershipPolicy (const QuantityValueOwnershipPolicy &) noexcept=default
 copy constructor.
constexpr QuantityValueOwnershipPolicy (QuantityValueOwnershipPolicy &&) noexcept=default
 move constructor.
template<typename T>
requires ((std::is_constructible_v<ValueType, T>)&& // (std::is_convertible_v<ValueType, T>)&& // (!AllowImplicitConversion))
TFEL_HOST_DEVICE constexpr QuantityValueOwnershipPolicy (const T &src) noexcept
 constructor from a value
template<typename T>
requires ((std::is_constructible_v<ValueType, T>)&& // (std::is_convertible_v<ValueType, T>)&& // (AllowImplicitConversion))
TFEL_HOST_DEVICE constexpr QuantityValueOwnershipPolicy (const T &src) noexcept
 constructor from a value
TFEL_HOST_DEVICE constexpr ValueType & getValue () noexcept
 return the value
TFEL_HOST_DEVICE constexpr const ValueType & getValue () const noexcept
 return the value
constexpr QuantityValueOwnershipPolicy & operator= (const QuantityValueOwnershipPolicy &) noexcept=default
 assignement operator
constexpr QuantityValueOwnershipPolicy & operator= (QuantityValueOwnershipPolicy &&) noexcept=default
 move assignement operator
template<typename T>
requires ((std::is_constructible_v<ValueType, T>)&& // (std::is_convertible_v<ValueType, T>)&& // (AllowImplicitConversion))
TFEL_HOST_DEVICE constexpr QuantityValueOwnershipPolicy & operator= (const T &src) noexcept
 constructor from a value
template<typename T>
requires ((std::is_same_v<ValueType, T>)&& // (AllowImplicitConversion))
TFEL_HOST_DEVICE constexpr operator T& () noexcept
 conversion operator
template<typename T>
requires ((std::is_same_v<ValueType, T>)&& // (AllowImplicitConversion))
TFEL_HOST_DEVICE constexpr operator T () const noexcept
 conversion operator
 ~QuantityValueOwnershipPolicy () noexcept=default
 destructor

Detailed Description

template<StandardArithmeticTypeConcept ValueType, bool AllowImplicitConversion>
struct tfel::math::internals::QuantityValueOwnershipPolicy< ValueType, AllowImplicitConversion >

an helper structure which holds the value internally.

Parameters
ValueTypethe underlying numerical type.

Constructor & Destructor Documentation

◆ QuantityValueOwnershipPolicy() [1/2]

template<StandardArithmeticTypeConcept ValueType, bool AllowImplicitConversion>
template<typename T>
requires ((std::is_constructible_v<ValueType, T>)&& // (std::is_convertible_v<ValueType, T>)&& // (!AllowImplicitConversion))
TFEL_HOST_DEVICE constexpr tfel::math::internals::QuantityValueOwnershipPolicy< ValueType, AllowImplicitConversion >::QuantityValueOwnershipPolicy ( const T & src)
inlineexplicitconstexprnoexcept

constructor from a value

Parameters
srcthe src.

◆ QuantityValueOwnershipPolicy() [2/2]

template<StandardArithmeticTypeConcept ValueType, bool AllowImplicitConversion>
template<typename T>
requires ((std::is_constructible_v<ValueType, T>)&& // (std::is_convertible_v<ValueType, T>)&& // (AllowImplicitConversion))
TFEL_HOST_DEVICE constexpr tfel::math::internals::QuantityValueOwnershipPolicy< ValueType, AllowImplicitConversion >::QuantityValueOwnershipPolicy ( const T & src)
inlineconstexprnoexcept

constructor from a value

Parameters
srcthe src.

Member Function Documentation

◆ operator=()

template<StandardArithmeticTypeConcept ValueType, bool AllowImplicitConversion>
template<typename T>
requires ((std::is_constructible_v<ValueType, T>)&& // (std::is_convertible_v<ValueType, T>)&& // (AllowImplicitConversion))
TFEL_HOST_DEVICE constexpr QuantityValueOwnershipPolicy & tfel::math::internals::QuantityValueOwnershipPolicy< ValueType, AllowImplicitConversion >::operator= ( const T & src)
inlineconstexprnoexcept

constructor from a value

Parameters
srcthe src.

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