diff options
author | Maksim Denisov <denisov.maksim@huawei.com> | 2024-10-08 13:25:41 +0200 |
---|---|---|
committer | Maksim Denisov <denisov.maksim@huawei.com> | 2024-10-08 15:41:50 +0200 |
commit | 0e024eb055e6e8272f419e898ae9eefd0085c34f (patch) | |
tree | b88ac4fe8c728631b53c424a8dab8c5a2f1577c6 /src/utils/cpp | |
parent | a050cfe72b6bc02a8df2cdeefa739931983462a7 (diff) | |
download | justbuild-0e024eb055e6e8272f419e898ae9eefd0085c34f.tar.gz |
Name value template parameters using kCamelCase.
Diffstat (limited to 'src/utils/cpp')
-rw-r--r-- | src/utils/cpp/type_safe_arithmetic.hpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/utils/cpp/type_safe_arithmetic.hpp b/src/utils/cpp/type_safe_arithmetic.hpp index c647996a..1ff53ce8 100644 --- a/src/utils/cpp/type_safe_arithmetic.hpp +++ b/src/utils/cpp/type_safe_arithmetic.hpp @@ -26,9 +26,9 @@ /// struct my_type_tag : TypeSafeArithmeticTag<int, -2, +3> {}; /// using my_type_t = TypeSafeArithmetic<my_type_tag>; template <typename T, - T MIN_VALUE = std::numeric_limits<T>::lowest(), - T MAX_VALUE = std::numeric_limits<T>::max(), - T SMALLEST_VALUE = std::numeric_limits<T>::min()> + T kMin = std::numeric_limits<T>::lowest(), + T kMax = std::numeric_limits<T>::max(), + T kSmallest = std::numeric_limits<T>::min()> struct TypeSafeArithmeticTag { static_assert(std::is_arithmetic_v<T>, "T must be an arithmetic type (integer or floating-point)"); @@ -39,9 +39,9 @@ struct TypeSafeArithmeticTag { using pointer_t = T*; using const_pointer_t = T const*; - static constexpr value_t kMaxValue = MAX_VALUE; - static constexpr value_t kMinValue = MIN_VALUE; - static constexpr value_t kSmallestValue = SMALLEST_VALUE; + static constexpr value_t kMaxValue = kMax; + static constexpr value_t kMinValue = kMin; + static constexpr value_t kSmallestValue = kSmallest; }; /// \class TypeSafeArithmetic |