[committed] libstdc++: Add [[nodiscard]] to experimental::randint
Jonathan Wakely
jwakely@redhat.com
Thu Aug 12 18:46:48 GMT 2021
Signed-off-by: Jonathan Wakely <jwakely@redhat.com>
libstdc++-v3/ChangeLog:
* include/experimental/random (experimental::randint): Add
nodiscard attribute.
Tested powerpc64le-linux. Committed to trunk.
-------------- next part --------------
commit 20ce14c7991fbb498e32a0f5e3b01ae88c9f5e9a
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Thu Aug 12 18:05:24 2021
libstdc++: Add [[nodiscard]] to experimental::randint
Signed-off-by: Jonathan Wakely <jwakely@redhat.com>
libstdc++-v3/ChangeLog:
* include/experimental/random (experimental::randint): Add
nodiscard attribute.
diff --git a/libstdc++-v3/include/experimental/random b/libstdc++-v3/include/experimental/random
index 2c2b359ff41..d7431e33e98 100644
--- a/libstdc++-v3/include/experimental/random
+++ b/libstdc++-v3/include/experimental/random
@@ -50,6 +50,7 @@ inline namespace fundamentals_v2 {
// 13.2.2.1, Function template randint
template<typename _IntType>
+ [[__nodiscard__]]
inline _IntType
randint(_IntType __a, _IntType __b)
{
More information about the Libstdc++
mailing list