[libcxx-commits] [libcxx] [libc++] Add [[nodiscard]] to static numeric limit functions (PR #83748)
A. Jiang via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Mar 3 18:57:24 PST 2024
================
@@ -21,9 +21,9 @@ class numeric_limits
{
public:
static constexpr bool is_specialized = false;
- static constexpr T min() noexcept;
- static constexpr T max() noexcept;
- static constexpr T lowest() noexcept;
+ [[nodiscard]] static constexpr T min() noexcept;
+ [[nodiscard]] static constexpr T max() noexcept;
+ [[nodiscard]] static constexpr T lowest() noexcept;
----------------
frederick-vs-ja wrote:
I don't think we should change the synopsis in the comments, because the comments mirror the standard wording, and the standard isn't saying `[[nodiscard]]`. Ditto below.
https://github.com/llvm/llvm-project/pull/83748
More information about the libcxx-commits
mailing list