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

an helper structure which wraps a reference to an external value. More...

Public Member Functions

constexpr QuantityReferenceOwnershipPolicy () noexcept=default
 default constructor
constexpr QuantityReferenceOwnershipPolicy (const QuantityReferenceOwnershipPolicy &) noexcept=default
 copy constructor.
constexpr QuantityReferenceOwnershipPolicy (QuantityReferenceOwnershipPolicy &&) noexcept=default
 move constructor.
TFEL_HOST_DEVICE constexpr QuantityReferenceOwnershipPolicy (ValueType &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 QuantityReferenceOwnershipPolicy & operator= (const QuantityReferenceOwnershipPolicy &) noexcept=default
 assignement operator
constexpr QuantityReferenceOwnershipPolicy & operator= (QuantityReferenceOwnershipPolicy &&) 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 QuantityReferenceOwnershipPolicy & 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 const T & () const noexcept
 conversion operator
 ~QuantityReferenceOwnershipPolicy () noexcept=default
 destructor

Detailed Description

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

an helper structure which wraps a reference to an external value.

Parameters
ValueTypethe underlying numerical type.

Constructor & Destructor Documentation

◆ QuantityReferenceOwnershipPolicy()

template<StandardArithmeticTypeConcept ValueType, bool AllowImplicitConversion>
TFEL_HOST_DEVICE constexpr tfel::math::internals::QuantityReferenceOwnershipPolicy< ValueType, AllowImplicitConversion >::QuantityReferenceOwnershipPolicy ( ValueType & src)
inlineexplicitconstexprnoexcept

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 QuantityReferenceOwnershipPolicy & tfel::math::internals::QuantityReferenceOwnershipPolicy< 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: