From: Jonathan Wakely Date: Fri, 28 Apr 2023 10:07:40 +0000 (+0100) Subject: libstdc++: Simplify preprocessor/namespace nesting in X-Git-Tag: basepoints/gcc-15~9812 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5c8b154c56a65faf64dfc5f8852e801150cb2f26;p=thirdparty%2Fgcc.git 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 --git a/libstdc++-v3/include/bits/move.h b/libstdc++-v3/include/bits/move.h index 6bc70e8e7241..4a8fceff96ac 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 * @{