mirror of
https://github.com/mpusz/mp-units.git
synced 2025-08-06 13:44:27 +02:00
fix: __cpp_explicit_this_parameter
spelling fixed
This commit is contained in:
@@ -102,7 +102,7 @@ template<typename T>
|
|||||||
concept AliasUnit = requires(T* t) { detail::to_base_alias_unit(t); };
|
concept AliasUnit = requires(T* t) { detail::to_base_alias_unit(t); };
|
||||||
|
|
||||||
// BaseDimension
|
// BaseDimension
|
||||||
#ifdef __cpp_explicit_this_parameter__
|
#ifdef __cpp_explicit_this_parameter
|
||||||
template<basic_fixed_string Symbol>
|
template<basic_fixed_string Symbol>
|
||||||
#else
|
#else
|
||||||
template<typename Self, basic_fixed_string Symbol>
|
template<typename Self, basic_fixed_string Symbol>
|
||||||
|
@@ -91,7 +91,7 @@ struct reference;
|
|||||||
*
|
*
|
||||||
* @tparam Symbol an unique identifier of the base dimension used to provide dimensional analysis support
|
* @tparam Symbol an unique identifier of the base dimension used to provide dimensional analysis support
|
||||||
*/
|
*/
|
||||||
#ifdef __cpp_explicit_this_parameter__
|
#ifdef __cpp_explicit_this_parameter
|
||||||
template<basic_fixed_string Symbol>
|
template<basic_fixed_string Symbol>
|
||||||
#else
|
#else
|
||||||
template<typename Self, basic_fixed_string Symbol>
|
template<typename Self, basic_fixed_string Symbol>
|
||||||
@@ -99,7 +99,7 @@ template<typename Self, basic_fixed_string Symbol>
|
|||||||
struct base_dimension {
|
struct base_dimension {
|
||||||
static constexpr auto symbol = Symbol; ///< Unique base dimension identifier
|
static constexpr auto symbol = Symbol; ///< Unique base dimension identifier
|
||||||
|
|
||||||
#ifdef __cpp_explicit_this_parameter__
|
#ifdef __cpp_explicit_this_parameter
|
||||||
template<Unit U, typename Self>
|
template<Unit U, typename Self>
|
||||||
requires(convertible(Self{}, detail::get_dimension_for(U{})))
|
requires(convertible(Self{}, detail::get_dimension_for(U{})))
|
||||||
[[nodiscard]] constexpr reference<Self, U> operator[](this const Self, U)
|
[[nodiscard]] constexpr reference<Self, U> operator[](this const Self, U)
|
||||||
@@ -206,7 +206,7 @@ struct derived_dimension_impl : detail::expr_fractions<derived_dimension<>, Ds..
|
|||||||
* @note User should not instantiate this type! It is not exported from the C++ module. The library will
|
* @note User should not instantiate this type! It is not exported from the C++ module. The library will
|
||||||
* instantiate this type automatically based on the dimensional arithmetic equation provided by the user.
|
* instantiate this type automatically based on the dimensional arithmetic equation provided by the user.
|
||||||
*/
|
*/
|
||||||
#ifdef __cpp_explicit_this_parameter__
|
#ifdef __cpp_explicit_this_parameter
|
||||||
|
|
||||||
template<DerivedDimensionSpec... Ds>
|
template<DerivedDimensionSpec... Ds>
|
||||||
struct derived_dimension : detail::derived_dimension_impl<Ds...> {
|
struct derived_dimension : detail::derived_dimension_impl<Ds...> {
|
||||||
@@ -401,7 +401,7 @@ struct common_type<D1, D2> {
|
|||||||
} // namespace std
|
} // namespace std
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cpp_explicit_this_parameter__
|
#ifdef __cpp_explicit_this_parameter
|
||||||
|
|
||||||
#define BASE_DIMENSION(name, symbol) \
|
#define BASE_DIMENSION(name, symbol) \
|
||||||
inline constexpr struct name : base_dimension<symbol> { \
|
inline constexpr struct name : base_dimension<symbol> { \
|
||||||
|
@@ -36,7 +36,7 @@
|
|||||||
|
|
||||||
namespace units {
|
namespace units {
|
||||||
|
|
||||||
#ifdef __cpp_explicit_this_parameter__
|
#ifdef __cpp_explicit_this_parameter
|
||||||
template<basic_fixed_string Symbol>
|
template<basic_fixed_string Symbol>
|
||||||
#else
|
#else
|
||||||
template<typename Self, basic_fixed_string Symbol>
|
template<typename Self, basic_fixed_string Symbol>
|
||||||
@@ -45,7 +45,7 @@ struct base_dimension;
|
|||||||
|
|
||||||
namespace detail {
|
namespace detail {
|
||||||
|
|
||||||
#ifdef __cpp_explicit_this_parameter__
|
#ifdef __cpp_explicit_this_parameter
|
||||||
template<basic_fixed_string Symbol>
|
template<basic_fixed_string Symbol>
|
||||||
void to_base_base_dimension(const volatile base_dimension<Symbol>*);
|
void to_base_base_dimension(const volatile base_dimension<Symbol>*);
|
||||||
#else
|
#else
|
||||||
@@ -56,7 +56,7 @@ void to_base_base_dimension(const volatile base_dimension<Self, Symbol>*);
|
|||||||
template<typename T>
|
template<typename T>
|
||||||
inline constexpr bool is_specialization_of_base_dimension = false;
|
inline constexpr bool is_specialization_of_base_dimension = false;
|
||||||
|
|
||||||
#ifdef __cpp_explicit_this_parameter__
|
#ifdef __cpp_explicit_this_parameter
|
||||||
template<basic_fixed_string Symbol>
|
template<basic_fixed_string Symbol>
|
||||||
inline constexpr bool is_specialization_of_base_dimension<base_dimension<Symbol>> = true;
|
inline constexpr bool is_specialization_of_base_dimension<base_dimension<Symbol>> = true;
|
||||||
#else
|
#else
|
||||||
|
@@ -137,7 +137,7 @@
|
|||||||
template<auto V, typename T>
|
template<auto V, typename T>
|
||||||
inline constexpr bool is_of_type = std::is_same_v<std::remove_cvref_t<decltype(V)>, T>;
|
inline constexpr bool is_of_type = std::is_same_v<std::remove_cvref_t<decltype(V)>, T>;
|
||||||
|
|
||||||
#ifdef __cpp_explicit_this_parameter__
|
#ifdef __cpp_explicit_this_parameter
|
||||||
|
|
||||||
#define BASE_DIMENSION_(name, symbol) \
|
#define BASE_DIMENSION_(name, symbol) \
|
||||||
inline constexpr struct name##_ : base_dimension<symbol> { \
|
inline constexpr struct name##_ : base_dimension<symbol> { \
|
||||||
|
Reference in New Issue
Block a user