diff options
| author | Anton Samokhvalov <[email protected]> | 2022-02-10 16:45:17 +0300 |
|---|---|---|
| committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:45:17 +0300 |
| commit | d3a398281c6fd1d3672036cb2d63f842d2cb28c5 (patch) | |
| tree | dd4bd3ca0f36b817e96812825ffaf10d645803f2 /util/generic/ylimits.h | |
| parent | 72cb13b4aff9bc9cf22e49251bc8fd143f82538f (diff) | |
Restoring authorship annotation for Anton Samokhvalov <[email protected]>. Commit 2 of 2.
Diffstat (limited to 'util/generic/ylimits.h')
| -rw-r--r-- | util/generic/ylimits.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/util/generic/ylimits.h b/util/generic/ylimits.h index 7982f9e7ed4..fe42b4dfc0e 100644 --- a/util/generic/ylimits.h +++ b/util/generic/ylimits.h @@ -1,20 +1,20 @@ #pragma once - -#include <limits> - + +#include <limits> + #if defined(max) || defined(min) - #error "stop defining 'min' and 'max' macros, evil people" + #error "stop defining 'min' and 'max' macros, evil people" #endif -template <class T> +template <class T> static constexpr T Max() noexcept { return std::numeric_limits<T>::max(); -} - -template <class T> +} + +template <class T> static constexpr T Min() noexcept { return std::numeric_limits<T>::min(); -} +} namespace NPrivate { struct TMax { @@ -33,11 +33,11 @@ namespace NPrivate { } static constexpr ::NPrivate::TMax Max() noexcept { - return {}; + return {}; } static constexpr ::NPrivate::TMin Min() noexcept { - return {}; + return {}; } namespace NPrivate { |
