libstdc++: Add [[nodiscard]] to experimental::randint
authorJonathan Wakely <jwakely@redhat.com>
Thu, 12 Aug 2021 17:05:24 +0000 (18:05 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Thu, 12 Aug 2021 18:46:16 +0000 (19:46 +0100)
Signed-off-by: Jonathan Wakely <jwakely@redhat.com>
libstdc++-v3/ChangeLog:

* include/experimental/random (experimental::randint): Add
nodiscard attribute.

libstdc++-v3/include/experimental/random

index 2c2b359..d7431e3 100644 (file)
@@ -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)
     {