aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2023-04-28 11:07:40 +0100
committerJonathan Wakely <jwakely@redhat.com>2023-04-28 13:05:50 +0100
commit5c8b154c56a65faf64dfc5f8852e801150cb2f26 (patch)
treeed0ca292b63a9bd97095aa42ae59303c3b818af2
parenta94dcac59ee4c99b523ae593cb1c0ad43d4a110b (diff)
downloadgcc-5c8b154c56a65faf64dfc5f8852e801150cb2f26.zip
gcc-5c8b154c56a65faf64dfc5f8852e801150cb2f26.tar.gz
gcc-5c8b154c56a65faf64dfc5f8852e801150cb2f26.tar.bz2
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.
-rw-r--r--libstdc++-v3/include/bits/move.h11
1 files changed, 2 insertions, 9 deletions
diff --git a/libstdc++-v3/include/bits/move.h b/libstdc++-v3/include/bits/move.h
index 6bc70e8..4a8fcef 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
* @{