From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2181) id 2FFC63858C50; Fri, 28 Apr 2023 12:07:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2FFC63858C50 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1682683643; bh=KzsBY7kta+jg2kZBMbZc+RK0BrE7Lz4Fh7fH25HmLRw=; h=From:To:Subject:Date:From; b=aODFVaqfmbFNu+7RWAkeiKo+qpAluH7/nK+xwUK8uoLitHVnQww+WMahU2uqNxMbI ZvqtvvS7BXFL4N/uWMdjcr01iKfRdMvhjk0MhY7qkndRiUee15MmAXPb1xMLrTUYI4 CXyESrMafib49o5fCaxQJEkwhb5nvdRxOI/tZAz4= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Jonathan Wakely To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc r14-327] libstdc++: Simplify preprocessor/namespace nesting in X-Act-Checkin: gcc X-Git-Author: Jonathan Wakely X-Git-Refname: refs/heads/master X-Git-Oldrev: a94dcac59ee4c99b523ae593cb1c0ad43d4a110b X-Git-Newrev: 5c8b154c56a65faf64dfc5f8852e801150cb2f26 Message-Id: <20230428120723.2FFC63858C50@sourceware.org> Date: Fri, 28 Apr 2023 12:07:23 +0000 (GMT) List-Id: https://gcc.gnu.org/g:5c8b154c56a65faf64dfc5f8852e801150cb2f26 commit r14-327-g5c8b154c56a65faf64dfc5f8852e801150cb2f26 Author: Jonathan Wakely Date: Fri Apr 28 11:07:40 2023 +0100 libstdc++: Simplify preprocessor/namespace nesting in There's no good reason to conditionally close and reopen namespace std within an #if block. Just include the header at the top instead. libstdc++-v3/ChangeLog: * include/bits/move.h: Simplify opening/closing namespace std. 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 #if __cplusplus < 201103L # include +#else +# include // 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 // Brings in std::declval too. - -namespace std _GLIBCXX_VISIBILITY(default) -{ -_GLIBCXX_BEGIN_NAMESPACE_VERSION - /** * @addtogroup utilities * @{