public inbox for libstdc++-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-2884] libstdc++: Add [[nodiscard]] to experimental::randint
@ 2021-08-12 18:46 Jonathan Wakely
  0 siblings, 0 replies; only message in thread
From: Jonathan Wakely @ 2021-08-12 18:46 UTC (permalink / raw)
  To: gcc-cvs, libstdc++-cvs

https://gcc.gnu.org/g:20ce14c7991fbb498e32a0f5e3b01ae88c9f5e9a

commit r12-2884-g20ce14c7991fbb498e32a0f5e3b01ae88c9f5e9a
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Thu Aug 12 18:05:24 2021 +0100

    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:
---
 libstdc++-v3/include/experimental/random | 1 +
 1 file changed, 1 insertion(+)

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)
     {


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-08-12 18:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-12 18:46 [gcc r12-2884] libstdc++: Add [[nodiscard]] to experimental::randint Jonathan Wakely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).