]> git.ipfire.org Git - thirdparty/gcc.git/commit
libstdc++: Declare const global variables inline
authorPatrick Palka <ppalka@redhat.com>
Sun, 6 Nov 2022 16:30:47 +0000 (11:30 -0500)
committerJonathan Wakely <jwakely@redhat.com>
Thu, 2 Feb 2023 09:34:15 +0000 (09:34 +0000)
commit953c3c68f8940d03bfded87dc79635451e1892b0
tree9da67cff42d665a9a3526389ad35c1da3ae5b71e
parentd31bd7138610a883310dce212bb0bdaaa8da7304
libstdc++: Declare const global variables inline

The changes inside the regex_constants and execution namespaces seem to
be (the only) unimplemented parts of P0607R0 "Inline Variable for the
Standard Library"; the rest of the changes are to implementation details.

libstdc++-v3/ChangeLog:

* include/bits/atomic_wait.h (_detail::__platform_wait_alignment):
Declare inline.  Remove redundant static specifier.
(__detail::__atomic_spin_count_relax): Declare inline.
(__detail::__atomic_spin_count): Likewise.
* include/bits/regex_automaton.h (__detail::_S_invalid_state_id):
Declare inline for C++17.  Declare constexpr.  Remove
redundant const and static specifiers.
* include/bits/regex_error.h (regex_constants::error_collate):
Declare inline for C++17 as per P0607R0.
(regex_constants::error_ctype): Likewise.
(regex_constants::error_escape): Likewise.
(regex_constants::error_backref): Likewise.
(regex_constants::error_brack): Likewise.
(regex_constants::error_paren): Likewise.
(regex_constants::error_brace): Likewise.
(regex_constants::error_badbrace): Likewise.
(regex_constants::error_range): Likewise.
(regex_constants::error_space): Likewise.
(regex_constants::error_badrepeat): Likewise.
(regex_constants::error_complexity): Likewise.
(regex_constants::error_stack): Likewise.
* include/ext/concurrence.h (__gnu_cxx::__default_lock_policy):
Likewise.  Remove redundant static specifier.
* include/pstl/execution_defs.h (execution::seq): Declare inline
for C++17 as per P0607R0.
(execution::par): Likewise.
(execution::par_unseq): Likewise.
(execution::unseq): Likewise.

(cherry picked from commit e3b10249119fb4258fb83d21d805a04f30b63152)
libstdc++-v3/include/bits/atomic_wait.h
libstdc++-v3/include/bits/regex_automaton.h
libstdc++-v3/include/bits/regex_error.h
libstdc++-v3/include/ext/concurrence.h
libstdc++-v3/include/pstl/execution_defs.h