[libcxx-commits] [libcxx] [libc++] Add [[nodiscard]] to static numeric limit functions (PR #83748)

Marc Auberer via libcxx-commits libcxx-commits at lists.llvm.org
Mon Mar 4 08:31:31 PST 2024


================
@@ -137,9 +137,9 @@ protected:
   typedef _Tp type;
 
   static _LIBCPP_CONSTEXPR const bool is_specialized = false;
-  _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type min() _NOEXCEPT { return type(); }
-  _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type max() _NOEXCEPT { return type(); }
-  _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type lowest() _NOEXCEPT { return type(); }
+  _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type min() _NOEXCEPT { return type(); }
----------------
marcauberer wrote:

Done.

https://github.com/llvm/llvm-project/pull/83748


More information about the libcxx-commits mailing list