aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2021-04-28 12:45:49 +0100
committerJonathan Wakely <jwakely@redhat.com>2021-04-28 12:45:49 +0100
commit5cc28000cfcc219fb4c45dbc5388ec05109049af (patch)
tree5a5cdce7b6b9eca1c6a00f830e237480f2cd28fe
parentb020cee5af4cb40b9971bfb943d7bd2795b2a3eb (diff)
downloadgcc-5cc28000cfcc219fb4c45dbc5388ec05109049af.zip
gcc-5cc28000cfcc219fb4c45dbc5388ec05109049af.tar.gz
gcc-5cc28000cfcc219fb4c45dbc5388ec05109049af.tar.bz2
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.
-rw-r--r--libstdc++-v3/include/bits/std_thread.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/libstdc++-v3/include/bits/std_thread.h b/libstdc++-v3/include/bits/std_thread.h
index 70cb31a..2a500bf 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