public inbox for libstdc++-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r11-8316] libstdc++: Add missing noexcept on std::thread member function [PR 100298]
@ 2021-04-28 11:56 Jonathan Wakely
  0 siblings, 0 replies; only message in thread
From: Jonathan Wakely @ 2021-04-28 11:56 UTC (permalink / raw)
  To: gcc-cvs, libstdc++-cvs

https://gcc.gnu.org/g:aae5106525d850c5f3ae8265374ead16c5e0a9b7

commit r11-8316-gaae5106525d850c5f3ae8265374ead16c5e0a9b7
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Wed Apr 28 12:45:49 2021 +0100

    libstdc++: Add missing noexcept on std::thread member function [PR 100298]
    
    The new inline definition of std::thread::hardware_concurrency() for
    non-gthreads targets is missing the noexcept-specifier that is on the
    declaration.
    
    libstdc++-v3/ChangeLog:
    
            PR libstdc++/100298
            * include/bits/std_thread.h (thread::hardware_concurrency): Add
            missing noexcept to inline definition for non-gthreads targets.
    
    (cherry picked from commit 5cc28000cfcc219fb4c45dbc5388ec05109049af)

Diff:
---
 libstdc++-v3/include/bits/std_thread.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libstdc++-v3/include/bits/std_thread.h b/libstdc++-v3/include/bits/std_thread.h
index 70cb31a5331..2a500bf1777 100644
--- a/libstdc++-v3/include/bits/std_thread.h
+++ b/libstdc++-v3/include/bits/std_thread.h
@@ -270,7 +270,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
 #ifndef _GLIBCXX_HAS_GTHREADS
   inline void thread::join() { std::__throw_system_error(EINVAL); }
   inline void thread::detach() { std::__throw_system_error(EINVAL); }
-  inline unsigned int thread::hardware_concurrency() { return 0; }
+  inline unsigned int thread::hardware_concurrency() noexcept { return 0; }
 #endif
 
   inline void


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

only message in thread, other threads:[~2021-04-28 11:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-28 11:56 [gcc r11-8316] libstdc++: Add missing noexcept on std::thread member function [PR 100298] 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).