From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2181) id 27BE53857723; Fri, 28 Apr 2023 13:10:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 27BE53857723 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1682687442; bh=0nxI5rAE83PgqRV/qt9Nt0RFOp1aOaXp+iRPtUKDIS8=; h=From:To:Subject:Date:From; b=oLoinw2NY3/PAIi2KjBy626YnQCBJx9/L46JfbiMHTo0H4KWPaF/0pxYBi6EWrav0 xrJLLooccRjzeYzSVtDRpz+QV+3NVcysVm++FDcD9TTlTt4UN47CbSNIXWSeaK8S6W SJk65I0Wef6dKf+0mLMkObuipcOO4qvj421Ajs7Y= 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 r13-7266] libstdc++: Simplify preprocessor/namespace nesting in X-Act-Checkin: gcc X-Git-Author: Jonathan Wakely X-Git-Refname: refs/heads/releases/gcc-13 X-Git-Oldrev: 9fa6a69a0478f66f2a3d6623d8353f287c26c486 X-Git-Newrev: 0d9f00612a81046f112cd7a17849ddfa9b5510b2 Message-Id: <20230428131042.27BE53857723@sourceware.org> Date: Fri, 28 Apr 2023 13:10:42 +0000 (GMT) List-Id: https://gcc.gnu.org/g:0d9f00612a81046f112cd7a17849ddfa9b5510b2 commit r13-7266-g0d9f00612a81046f112cd7a17849ddfa9b5510b2 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. (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 #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 * @{