|
Unit Conversion and Dimensional Analysis Library 3.6.1
A compile-time, header-only C++23 dimensional-analysis library
|
dimensionless unit with decibel scale More...
#include <core.h>
Public Types | |
| using | base = ::units::unit<traits::strong_t<dimensionless_>, Underlying, ::units::decibel_scale> |
| template<class NewUnderlying> | |
| using | rebind = decibels<NewUnderlying> |
| Re-create this named unit with a different underlying type, so traits (replace_underlying, common_type). | |
| Public Types inherited from units::unit< traits::strong_t< dimensionless_ >, double, ::units::decibel_scale > | |
| using | numerical_scale_type |
| using | underlying_type |
| < Type of the numerical scale of the unit (e.g. linear_scale) | |
| using | value_type |
| < Type of the underlying storage of the unit (e.g. double) | |
| using | conversion_factor |
| < Synonym for underlying type. May be removed in future versions. Prefer underlying_type. | |
Public Member Functions | |
| decibels (const decibels &)=default | |
| decibels (decibels &&)=default | |
| decibels & | operator= (const decibels &)=default |
| decibels & | operator= (decibels &&)=default |
| constexpr | decibels (const base &other) noexcept |
|
template<::units::ConversionFactorType Cf, ::units::ArithmeticType Ty, ::units::NumericalScaleType< Ty > Ns> requires (::units::traits::is_same_dimension_unit_v<::units::unit<Cf, Ty, Ns>, base> && !::units::detail::is_losslessly_convertible_unit<::units::unit<Cf, Ty, Ns>, base> && (::std::is_floating_point_v<Ty> || ::std::is_integral_v<Ty>) && ::std::is_integral_v<Underlying>) | |
| consteval | decibels (const ::units::unit< Cf, Ty, Ns > &rhs) |
| template<class Rhs> | |
| requires ::std::is_arithmetic_v< Rhs > constexpr decibels & | operator= (const Rhs &rhs) noexcept |
| Public Member Functions inherited from units::unit< traits::strong_t< dimensionless_ >, double, ::units::decibel_scale > | |
| constexpr unit & | operator= (const unit &rhs) noexcept=default |
| default assignment | |
| constexpr bool | operator< (const unit< ConversionFactorRhs, Ty, NsRhs > &rhs) const noexcept |
| less-than | |
| constexpr bool | operator<= (const unit< ConversionFactorRhs, Ty, NsRhs > &rhs) const noexcept |
| less-than or equal | |
| constexpr bool | operator> (const unit< ConversionFactorRhs, Ty, NsRhs > &rhs) const noexcept |
| greater-than | |
| constexpr bool | operator>= (const unit< ConversionFactorRhs, Ty, NsRhs > &rhs) const noexcept |
| greater-than or equal | |
| constexpr bool | operator== (const unit< ConversionFactorRhs, Ty, NsRhs > &rhs) const noexcept |
| equality | |
| constexpr bool | operator!= (const unit< ConversionFactorRhs, Ty, NsRhs > &rhs) const noexcept |
| inequality | |
| constexpr underlying_type | raw () const noexcept |
| scaled unit value | |
| constexpr auto | value () const noexcept |
| unit value | |
| constexpr Ty | to () const noexcept |
| unit value | |
| constexpr T | to_linearized () const noexcept |
| linearized unit value | |
| constexpr unit< Cf, Ty > | convert () const noexcept |
| conversion | |
| constexpr | operator Ty () const noexcept |
| implicit type unsafe conversion. | |
| constexpr | operator std::chrono::duration< Rep, Period > () const noexcept |
| chrono implicit type conversion. | |
| constexpr const char * | name () const noexcept |
| returns the unit name | |
| constexpr const char * | abbreviation () const noexcept |
| returns the unit abbreviation | |
Additional Inherited Members | |
| Public Attributes inherited from units::unit< traits::strong_t< dimensionless_ >, double, ::units::decibel_scale > | |
| T | _linearized_value |
| Not to be used as part of the official API, this member is public to allow the use of units as NTTP types. | |
dimensionless unit with decibel scale
| using units::decibels< Underlying >::rebind = decibels<NewUnderlying> |
Re-create this named unit with a different underlying type, so traits (replace_underlying, common_type).
that swap the storage type PRESERVE the friendly name instead of decaying to the plain unit<...>.