[libc++][NFC] Add namespace comments in ranges
authorNikolas Klauser <nikolasklauser@berlin.de>
Tue, 1 Feb 2022 17:11:49 +0000 (18:11 +0100)
committerNikolas Klauser <nikolasklauser@berlin.de>
Tue, 1 Feb 2022 17:18:13 +0000 (18:18 +0100)
With this patch there should be no more namespaces without closing comment

Reviewed By: ldionne, Quuxplusone, #libc

Spies: libcxx-commits

Differential Revision: https://reviews.llvm.org/D118668

13 files changed:
libcxx/include/__functional/function.h
libcxx/include/__ranges/access.h
libcxx/include/__ranges/all.h
libcxx/include/__ranges/common_view.h
libcxx/include/__ranges/data.h
libcxx/include/__ranges/empty.h
libcxx/include/__ranges/iota_view.h
libcxx/include/__ranges/reverse_view.h
libcxx/include/__ranges/size.h
libcxx/include/__ranges/transform_view.h
libcxx/include/__ranges/view_interface.h
libcxx/include/cstddef
libcxx/include/variant

index b6d383c..6bb7eb7 100644 (file)
@@ -1664,7 +1664,7 @@ __func<_Fp, _Alloc, _Rp(_A0, _A1, _A2)>::target_type() const
 
 #endif // _LIBCPP_NO_RTTI
 
-}  // __function
+} // namespace __function
 
 template<class _Rp>
 class _LIBCPP_TEMPLATE_VIS function<_Rp()>
index eb89c1a..67c6c57 100644 (file)
@@ -83,7 +83,7 @@ namespace __begin {
 
     void operator()(auto&&) const = delete;
   };
-}
+} // namespace __begin
 
 inline namespace __cpo {
   inline constexpr auto begin = __begin::__fn{};
@@ -150,7 +150,7 @@ namespace __end {
 
     void operator()(auto&&) const = delete;
   };
-}
+} // namespace __end
 
 inline namespace __cpo {
   inline constexpr auto end = __end::__fn{};
@@ -178,7 +178,7 @@ namespace __cbegin {
       -> decltype(      ranges::begin(static_cast<const _Tp&&>(__t)))
       { return          ranges::begin(static_cast<const _Tp&&>(__t)); }
   };
-}
+} // namespace __cbegin
 
 inline namespace __cpo {
   inline constexpr auto cbegin = __cbegin::__fn{};
@@ -206,7 +206,7 @@ namespace __cend {
       -> decltype(      ranges::end(static_cast<const _Tp&&>(__t)))
       { return          ranges::end(static_cast<const _Tp&&>(__t)); }
   };
-}
+} // namespace __cend
 
 inline namespace __cpo {
   inline constexpr auto cend = __cend::__fn{};
index f1e7830..b0a58e9 100644 (file)
@@ -64,7 +64,7 @@ namespace __all {
       return ranges::owning_view{_VSTD::forward<_Tp>(__t)};
     }
   };
-}
+} // namespace __all
 
 inline namespace __cpo {
   inline constexpr auto all = __all::__fn{};
index df40194..fb8078d 100644 (file)
@@ -120,11 +120,11 @@ namespace __common {
       -> decltype(      common_view{_VSTD::forward<_Range>(__range)})
       { return          common_view{_VSTD::forward<_Range>(__range)}; }
   };
-}
+} // namespace __common
 
 inline namespace __cpo {
   inline constexpr auto common = __common::__fn{};
-}
+} // namespace __cpo
 } // namespace views
 } // namespace ranges
 
index 2fd9929..f97ec80 100644 (file)
@@ -64,7 +64,7 @@ namespace __data {
       return _VSTD::to_address(ranges::begin(__t));
     }
   };
-}
+} // namespace __data
 
 inline namespace __cpo {
   inline constexpr auto data = __data::__fn{};
@@ -92,7 +92,7 @@ namespace __cdata {
       -> decltype(      ranges::data(static_cast<const _Tp&&>(__t)))
       { return          ranges::data(static_cast<const _Tp&&>(__t)); }
   };
-}
+} // namespace __cdata
 
 inline namespace __cpo {
   inline constexpr auto cdata = __cdata::__fn{};
index 57762bf..b06a81c 100644 (file)
@@ -68,7 +68,7 @@ namespace __empty {
       return ranges::begin(__t) == ranges::end(__t);
     }
   };
-}
+} // namespace __empty
 
 inline namespace __cpo {
   inline constexpr auto empty = __empty::__fn{};
index 6e97873..17f6021 100644 (file)
@@ -397,7 +397,7 @@ namespace __iota {
 
 inline namespace __cpo {
   inline constexpr auto iota = __iota::__fn{};
-}
+} // namespace __cpo
 } // namespace views
 } // namespace ranges
 
index a2d8568..04ac7f2 100644 (file)
@@ -175,11 +175,11 @@ namespace ranges {
         -> decltype(      reverse_view{_VSTD::forward<_Range>(__range)})
         { return          reverse_view{_VSTD::forward<_Range>(__range)}; }
     };
-  }
+  } // namespace __reverse
 
   inline namespace __cpo {
     inline constexpr auto reverse = __reverse::__fn{};
-  }
+  } // namespace __cpo
   } // namespace views
 } // namespace ranges
 
index 1c5081b..e1aaf7e 100644 (file)
@@ -29,7 +29,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
 namespace ranges {
   template<class>
   inline constexpr bool disable_sized_range = false;
-}
+} // namespace ranges
 
 // [range.prim.size]
 
@@ -97,7 +97,7 @@ namespace __size {
       return _VSTD::__to_unsigned_like(ranges::end(__t) - ranges::begin(__t));
     }
   };
-}
+} // namespace __size
 
 inline namespace __cpo {
   inline constexpr auto size = __size::__fn{};
@@ -121,7 +121,7 @@ namespace __ssize {
         return static_cast<_Signed>(ranges::size(__t));
     }
   };
-}
+} // namespace __ssize
 
 inline namespace __cpo {
   inline constexpr auto ssize = __ssize::__fn{};
index 9907753..d39dd40 100644 (file)
@@ -424,11 +424,11 @@ namespace __transform {
       noexcept(is_nothrow_constructible_v<decay_t<_Fn>, _Fn>)
     { return __range_adaptor_closure_t(_VSTD::__bind_back(*this, _VSTD::forward<_Fn>(__f))); }
   };
-}
+} // namespace __transform
 
 inline namespace __cpo {
   inline constexpr auto transform = __transform::__fn{};
-}
+} // namespace __cpo
 } // namespace views
 
 } // namespace ranges
index 674520c..0a37323 100644 (file)
@@ -186,7 +186,7 @@ public:
   }
 };
 
-}
+} // namespace ranges
 
 #endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
 
index ed5aea6..e77629e 100644 (file)
@@ -156,7 +156,8 @@ template <class _Integer>
 template <class _Integer, class = _EnableByteOverload<_Integer> >
   _LIBCPP_NODISCARD_EXT constexpr _Integer
   to_integer(byte __b) noexcept { return static_cast<_Integer>(__b); }
-}
+
+} // namespace std
 
 #endif
 
index 51bcd6e..21fd537 100644 (file)
@@ -1252,7 +1252,7 @@ template <class _Tp, class... _Types>
 using __best_match_t =
     typename invoke_result_t<_MakeOverloads<_Types...>, _Tp, _Tp>::type;
 
-} // __variant_detail
+} // namespace __variant_detail
 
 template <class... _Types>
 class _LIBCPP_TEMPLATE_VIS variant