[libc++][NFC] Update namespace comments in include/
update the namspace comments in include/
Reviewed By: ldionne, #libc
Spies: smeenai, libcxx-commits
Differential Revision: https://reviews.llvm.org/D114947
NOKEYCHECK=True
GitOrigin-RevId: d2b0df35afb7184f5a68f67d6ed0c6230688df7f
diff --git a/include/__functional/bind.h b/include/__functional/bind.h
index 0b74d91..0eb95c8 100644
--- a/include/__functional/bind.h
+++ b/include/__functional/bind.h
@@ -70,7 +70,7 @@
/* inline */ constexpr __ph<10> _10{};
#endif // defined(_LIBCPP_CXX03_LANG) || defined(_LIBCPP_BUILDING_LIBRARY)
-} // placeholders
+} // namespace placeholders
template<int _Np>
struct __is_placeholder<placeholders::__ph<_Np> >
diff --git a/include/__functional/function.h b/include/__functional/function.h
index 83fd7c1..0a17b0b 100644
--- a/include/__functional/function.h
+++ b/include/__functional/function.h
@@ -946,7 +946,7 @@
#endif // _LIBCPP_HAS_EXTENSION_BLOCKS && !_LIBCPP_HAS_OBJC_ARC
-} // __function
+} // namespace __function
template<class _Rp, class ..._ArgTypes>
class _LIBCPP_TEMPLATE_VIS function<_Rp(_ArgTypes...)>
diff --git a/include/__nullptr b/include/__nullptr
index d02be21..c6645cd 100644
--- a/include/__nullptr
+++ b/include/__nullptr
@@ -54,7 +54,7 @@
namespace std
{
typedef decltype(nullptr) nullptr_t;
-}
+} // namespace std
#endif // _LIBCPP_HAS_NO_NULLPTR
diff --git a/include/__threading_support b/include/__threading_support
index 0094fca..1ff8861 100644
--- a/include/__threading_support
+++ b/include/__threading_support
@@ -296,7 +296,7 @@
return __ts;
}
-}
+} // namespace __thread_detail
#if defined(_LIBCPP_HAS_THREAD_API_PTHREAD)
@@ -643,7 +643,7 @@
_LIBCPP_INLINE_VISIBILITY __thread_id get_id() _NOEXCEPT;
-} // this_thread
+} // namespace this_thread
template<> struct hash<__thread_id>;
@@ -713,7 +713,7 @@
return __libcpp_thread_get_current_id();
}
-} // this_thread
+} // namespace this_thread
#endif // !_LIBCPP_HAS_NO_THREADS
diff --git a/include/__utility/rel_ops.h b/include/__utility/rel_ops.h
index c94b8fd..d59e96d 100644
--- a/include/__utility/rel_ops.h
+++ b/include/__utility/rel_ops.h
@@ -55,7 +55,7 @@
return !(__x < __y);
}
-} // rel_ops
+} // namespace rel_ops
_LIBCPP_END_NAMESPACE_STD
diff --git a/include/charconv b/include/charconv
index 3c969dc..ff7b75c 100644
--- a/include/charconv
+++ b/include/charconv
@@ -105,7 +105,7 @@
namespace __itoa {
_LIBCPP_AVAILABILITY_TO_CHARS _LIBCPP_FUNC_VIS char* __u64toa(uint64_t __value, char* __buffer) _NOEXCEPT;
_LIBCPP_AVAILABILITY_TO_CHARS _LIBCPP_FUNC_VIS char* __u32toa(uint32_t __value, char* __buffer) _NOEXCEPT;
-}
+} // namespace __itoa
#ifndef _LIBCPP_CXX03_LANG
diff --git a/include/chrono b/include/chrono
index d29734f..90c9b08 100644
--- a/include/chrono
+++ b/include/chrono
@@ -738,7 +738,7 @@
template <class _Rep, class _Period>
struct __is_duration<const volatile duration<_Rep, _Period> > : true_type {};
-} // chrono
+} // namespace chrono
template <class _Rep1, class _Period1, class _Rep2, class _Period2>
struct _LIBCPP_TEMPLATE_VIS common_type<chrono::duration<_Rep1, _Period1>,
@@ -1265,7 +1265,7 @@
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR time_point max() _NOEXCEPT {return time_point(duration::max());}
};
-} // chrono
+} // namespace chrono
template <class _Clock, class _Duration1, class _Duration2>
struct _LIBCPP_TEMPLATE_VIS common_type<chrono::time_point<_Clock, _Duration1>,
@@ -2701,7 +2701,7 @@
}
#endif // _LIBCPP_STD_VER > 17
-} // chrono
+} // namespace chrono
#if _LIBCPP_STD_VER > 11
// Suffixes for duration literals [time.duration.literals]
@@ -2786,11 +2786,12 @@
return chrono::year(static_cast<int>(__y));
}
#endif
-}}
+} // namespace chrono_literals
+} // namespace literals
namespace chrono { // hoist the literals into namespace std::chrono
using namespace literals::chrono_literals;
-}
+} // namespace chrono
#endif
diff --git a/include/complex b/include/complex
index 6b74435..2dc58c0 100644
--- a/include/complex
+++ b/include/complex
@@ -1485,8 +1485,8 @@
{
return { 0.0f, static_cast<float>(__im) };
}
- }
-}
+ } // namespace complex_literals
+} // namespace literals
#endif
_LIBCPP_END_NAMESPACE_STD
diff --git a/include/exception b/include/exception
index 5f54861..886daac 100644
--- a/include/exception
+++ b/include/exception
@@ -328,6 +328,6 @@
{
}
-} // std
+} // namespace std
#endif // _LIBCPP_EXCEPTION
diff --git a/include/ext/__hash b/include/ext/__hash
index 268577f..2f998ee 100644
--- a/include/ext/__hash
+++ b/include/ext/__hash
@@ -129,6 +129,6 @@
return __c;
}
};
-}
+} // namespace __gnu_cxx
#endif // _LIBCPP_EXT_HASH
diff --git a/include/ext/hash_map b/include/ext/hash_map
index 6c757e2..d6ea26c 100644
--- a/include/ext/hash_map
+++ b/include/ext/hash_map
@@ -979,6 +979,6 @@
return !(__x == __y);
}
-} // __gnu_cxx
+} // namespace __gnu_cxx
#endif // _LIBCPP_HASH_MAP
diff --git a/include/ext/hash_set b/include/ext/hash_set
index b61f5f1..80829d5 100644
--- a/include/ext/hash_set
+++ b/include/ext/hash_set
@@ -654,6 +654,6 @@
return !(__x == __y);
}
-} // __gnu_cxx
+} // namespace __gnu_cxx
#endif // _LIBCPP_HASH_SET
diff --git a/include/initializer_list b/include/initializer_list
index d867ee6..fefaf8c 100644
--- a/include/initializer_list
+++ b/include/initializer_list
@@ -112,6 +112,6 @@
#endif // !defined(_LIBCPP_CXX03_LANG)
-} // std
+} // namespace std
#endif // _LIBCPP_INITIALIZER_LIST
diff --git a/include/new b/include/new
index 593af9d..be0d972 100644
--- a/include/new
+++ b/include/new
@@ -177,7 +177,7 @@
inline constexpr destroying_delete_t destroying_delete{};
#endif // _LIBCPP_STD_VER > 17
-} // std
+} // namespace std
#if defined(_LIBCPP_CXX03_LANG)
#define _THROW_BAD_ALLOC throw(std::bad_alloc)
diff --git a/include/optional b/include/optional
index 837f867..1faa78e 100644
--- a/include/optional
+++ b/include/optional
@@ -175,7 +175,7 @@
virtual const char* what() const _NOEXCEPT;
};
-} // std
+} // namespace std
#if _LIBCPP_STD_VER > 14
diff --git a/include/regex b/include/regex
index 815ff7d..8203c81 100644
--- a/include/regex
+++ b/include/regex
@@ -978,7 +978,7 @@
__re_err_parse
};
-} // regex_constants
+} // namespace regex_constants
class _LIBCPP_EXCEPTION_ABI regex_error
: public runtime_error
diff --git a/include/stdexcept b/include/stdexcept
index ddbc630..c1dc056 100644
--- a/include/stdexcept
+++ b/include/stdexcept
@@ -209,7 +209,7 @@
#endif
};
-} // std
+} // namespace std
_LIBCPP_BEGIN_NAMESPACE_STD
diff --git a/include/string b/include/string
index 313a7b5..ed2fb7e 100644
--- a/include/string
+++ b/include/string
@@ -4571,8 +4571,8 @@
{
return basic_string<char32_t> (__str, __len);
}
- }
-}
+ } // namespace string_literals
+} // namespace literals
#endif
_LIBCPP_END_NAMESPACE_STD
diff --git a/include/string_view b/include/string_view
index a5f85e8..c40782d 100644
--- a/include/string_view
+++ b/include/string_view
@@ -947,8 +947,8 @@
{
return basic_string_view<char32_t> (__str, __len);
}
- }
-}
+ } // namespace string_view_literals
+} // namespace literals
#endif
_LIBCPP_END_NAMESPACE_STD
diff --git a/include/thread b/include/thread
index a51a11c..bf751c8 100644
--- a/include/thread
+++ b/include/thread
@@ -403,7 +403,7 @@
inline _LIBCPP_INLINE_VISIBILITY
void yield() _NOEXCEPT {__libcpp_thread_yield();}
-} // this_thread
+} // namespace this_thread
_LIBCPP_END_NAMESPACE_STD
diff --git a/include/tuple b/include/tuple
index 2e3d196..8ee5c2e 100644
--- a/include/tuple
+++ b/include/tuple
@@ -1200,7 +1200,7 @@
static_assert(!is_same<_T1, _T1>::value, "type not in empty type list");
};
-} // namespace __find_detail;
+} // namespace __find_detail
template <typename _T1, typename... _Args>
struct __find_exactly_one_t
@@ -1257,7 +1257,7 @@
namespace {
constexpr __ignore_t<unsigned char> ignore = __ignore_t<unsigned char>();
-}
+} // namespace
template <class... _Tp>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
diff --git a/include/type_traits b/include/type_traits
index bfb6fcb..4c8f198 100644
--- a/include/type_traits
+++ b/include/type_traits
@@ -3953,7 +3953,7 @@
template <class _Tp, class _Up>
struct __nothrow_swappable_with<_Tp, _Up, false> : false_type {};
-} // __detail
+} // namespace __detail
template <class _Tp>
struct __is_swappable
diff --git a/include/typeinfo b/include/typeinfo
index d0f9db3..af82175 100644
--- a/include/typeinfo
+++ b/include/typeinfo
@@ -361,7 +361,7 @@
virtual const char* what() const _NOEXCEPT;
};
-} // std
+} // namespace std
#endif // defined(_LIBCPP_ABI_VCRUNTIME)