public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Jonathan Wakely <redi@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc r13-7266] libstdc++: Simplify preprocessor/namespace nesting in <bits/move.h> Date: Fri, 28 Apr 2023 13:10:42 +0000 (GMT) [thread overview] Message-ID: <20230428131042.27BE53857723@sourceware.org> (raw) https://gcc.gnu.org/g:0d9f00612a81046f112cd7a17849ddfa9b5510b2 commit r13-7266-g0d9f00612a81046f112cd7a17849ddfa9b5510b2 Author: Jonathan Wakely <jwakely@redhat.com> Date: Fri Apr 28 11:07:40 2023 +0100 libstdc++: Simplify preprocessor/namespace nesting in <bits/move.h> There's no good reason to conditionally close and reopen namespace std within an #if block. Just include the <type_traits> header at the top instead. libstdc++-v3/ChangeLog: * include/bits/move.h: Simplify opening/closing namespace std. (cherry picked from commit 5c8b154c56a65faf64dfc5f8852e801150cb2f26) Diff: --- libstdc++-v3/include/bits/move.h | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/libstdc++-v3/include/bits/move.h b/libstdc++-v3/include/bits/move.h index 6bc70e8e724..4a8fceff96a 100644 --- a/libstdc++-v3/include/bits/move.h +++ b/libstdc++-v3/include/bits/move.h @@ -33,6 +33,8 @@ #include <bits/c++config.h> #if __cplusplus < 201103L # include <bits/concept_check.h> +#else +# include <type_traits> // Brings in std::declval too. #endif namespace std _GLIBCXX_VISIBILITY(default) @@ -51,15 +53,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #if __cplusplus >= 201103L -_GLIBCXX_END_NAMESPACE_VERSION -} // namespace - -#include <type_traits> // Brings in std::declval too. - -namespace std _GLIBCXX_VISIBILITY(default) -{ -_GLIBCXX_BEGIN_NAMESPACE_VERSION - /** * @addtogroup utilities * @{
reply other threads:[~2023-04-28 13:10 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20230428131042.27BE53857723@sourceware.org \ --to=redi@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ --cc=libstdc++-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).