aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2021-08-12 18:05:24 +0100
committerJonathan Wakely <jwakely@redhat.com>2021-08-12 19:46:16 +0100
commit20ce14c7991fbb498e32a0f5e3b01ae88c9f5e9a (patch)
tree59ce35eec46968b581f577ae1a9900028f0780fe
parent27a1fb385b7fe706f05608e53f3e91d7d3442b8b (diff)
downloadgcc-20ce14c7991fbb498e32a0f5e3b01ae88c9f5e9a.zip
gcc-20ce14c7991fbb498e32a0f5e3b01ae88c9f5e9a.tar.gz
gcc-20ce14c7991fbb498e32a0f5e3b01ae88c9f5e9a.tar.bz2
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.
-rw-r--r--libstdc++-v3/include/experimental/random1
1 files changed, 1 insertions, 0 deletions
diff --git a/libstdc++-v3/include/experimental/random b/libstdc++-v3/include/experimental/random
index 2c2b359..d7431e3 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)
{