[libc++][NFC] Add namespace comments in ranges

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
This commit is contained in:
Nikolas Klauser 2022-02-01 18:11:49 +01:00
parent 93ee588232
commit 9c52a19e32
13 changed files with 23 additions and 22 deletions

View File

@ -1664,7 +1664,7 @@ __func<_Fp, _Alloc, _Rp(_A0, _A1, _A2)>::target_type() const
#endif // _LIBCPP_NO_RTTI #endif // _LIBCPP_NO_RTTI
} // __function } // namespace __function
template<class _Rp> template<class _Rp>
class _LIBCPP_TEMPLATE_VIS function<_Rp()> class _LIBCPP_TEMPLATE_VIS function<_Rp()>

View File

@ -83,7 +83,7 @@ namespace __begin {
void operator()(auto&&) const = delete; void operator()(auto&&) const = delete;
}; };
} } // namespace __begin
inline namespace __cpo { inline namespace __cpo {
inline constexpr auto begin = __begin::__fn{}; inline constexpr auto begin = __begin::__fn{};
@ -150,7 +150,7 @@ namespace __end {
void operator()(auto&&) const = delete; void operator()(auto&&) const = delete;
}; };
} } // namespace __end
inline namespace __cpo { inline namespace __cpo {
inline constexpr auto end = __end::__fn{}; inline constexpr auto end = __end::__fn{};
@ -178,7 +178,7 @@ namespace __cbegin {
-> decltype( ranges::begin(static_cast<const _Tp&&>(__t))) -> decltype( ranges::begin(static_cast<const _Tp&&>(__t)))
{ return ranges::begin(static_cast<const _Tp&&>(__t)); } { return ranges::begin(static_cast<const _Tp&&>(__t)); }
}; };
} } // namespace __cbegin
inline namespace __cpo { inline namespace __cpo {
inline constexpr auto cbegin = __cbegin::__fn{}; inline constexpr auto cbegin = __cbegin::__fn{};
@ -206,7 +206,7 @@ namespace __cend {
-> decltype( ranges::end(static_cast<const _Tp&&>(__t))) -> decltype( ranges::end(static_cast<const _Tp&&>(__t)))
{ return ranges::end(static_cast<const _Tp&&>(__t)); } { return ranges::end(static_cast<const _Tp&&>(__t)); }
}; };
} } // namespace __cend
inline namespace __cpo { inline namespace __cpo {
inline constexpr auto cend = __cend::__fn{}; inline constexpr auto cend = __cend::__fn{};

View File

@ -64,7 +64,7 @@ namespace __all {
return ranges::owning_view{_VSTD::forward<_Tp>(__t)}; return ranges::owning_view{_VSTD::forward<_Tp>(__t)};
} }
}; };
} } // namespace __all
inline namespace __cpo { inline namespace __cpo {
inline constexpr auto all = __all::__fn{}; inline constexpr auto all = __all::__fn{};

View File

@ -120,11 +120,11 @@ namespace __common {
-> decltype( common_view{_VSTD::forward<_Range>(__range)}) -> decltype( common_view{_VSTD::forward<_Range>(__range)})
{ return common_view{_VSTD::forward<_Range>(__range)}; } { return common_view{_VSTD::forward<_Range>(__range)}; }
}; };
} } // namespace __common
inline namespace __cpo { inline namespace __cpo {
inline constexpr auto common = __common::__fn{}; inline constexpr auto common = __common::__fn{};
} } // namespace __cpo
} // namespace views } // namespace views
} // namespace ranges } // namespace ranges

View File

@ -64,7 +64,7 @@ namespace __data {
return _VSTD::to_address(ranges::begin(__t)); return _VSTD::to_address(ranges::begin(__t));
} }
}; };
} } // namespace __data
inline namespace __cpo { inline namespace __cpo {
inline constexpr auto data = __data::__fn{}; inline constexpr auto data = __data::__fn{};
@ -92,7 +92,7 @@ namespace __cdata {
-> decltype( ranges::data(static_cast<const _Tp&&>(__t))) -> decltype( ranges::data(static_cast<const _Tp&&>(__t)))
{ return ranges::data(static_cast<const _Tp&&>(__t)); } { return ranges::data(static_cast<const _Tp&&>(__t)); }
}; };
} } // namespace __cdata
inline namespace __cpo { inline namespace __cpo {
inline constexpr auto cdata = __cdata::__fn{}; inline constexpr auto cdata = __cdata::__fn{};

View File

@ -68,7 +68,7 @@ namespace __empty {
return ranges::begin(__t) == ranges::end(__t); return ranges::begin(__t) == ranges::end(__t);
} }
}; };
} } // namespace __empty
inline namespace __cpo { inline namespace __cpo {
inline constexpr auto empty = __empty::__fn{}; inline constexpr auto empty = __empty::__fn{};

View File

@ -397,7 +397,7 @@ namespace __iota {
inline namespace __cpo { inline namespace __cpo {
inline constexpr auto iota = __iota::__fn{}; inline constexpr auto iota = __iota::__fn{};
} } // namespace __cpo
} // namespace views } // namespace views
} // namespace ranges } // namespace ranges

View File

@ -175,11 +175,11 @@ namespace ranges {
-> decltype( reverse_view{_VSTD::forward<_Range>(__range)}) -> decltype( reverse_view{_VSTD::forward<_Range>(__range)})
{ return reverse_view{_VSTD::forward<_Range>(__range)}; } { return reverse_view{_VSTD::forward<_Range>(__range)}; }
}; };
} } // namespace __reverse
inline namespace __cpo { inline namespace __cpo {
inline constexpr auto reverse = __reverse::__fn{}; inline constexpr auto reverse = __reverse::__fn{};
} } // namespace __cpo
} // namespace views } // namespace views
} // namespace ranges } // namespace ranges

View File

@ -29,7 +29,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
namespace ranges { namespace ranges {
template<class> template<class>
inline constexpr bool disable_sized_range = false; inline constexpr bool disable_sized_range = false;
} } // namespace ranges
// [range.prim.size] // [range.prim.size]
@ -97,7 +97,7 @@ namespace __size {
return _VSTD::__to_unsigned_like(ranges::end(__t) - ranges::begin(__t)); return _VSTD::__to_unsigned_like(ranges::end(__t) - ranges::begin(__t));
} }
}; };
} } // namespace __size
inline namespace __cpo { inline namespace __cpo {
inline constexpr auto size = __size::__fn{}; inline constexpr auto size = __size::__fn{};
@ -121,7 +121,7 @@ namespace __ssize {
return static_cast<_Signed>(ranges::size(__t)); return static_cast<_Signed>(ranges::size(__t));
} }
}; };
} } // namespace __ssize
inline namespace __cpo { inline namespace __cpo {
inline constexpr auto ssize = __ssize::__fn{}; inline constexpr auto ssize = __ssize::__fn{};

View File

@ -424,11 +424,11 @@ namespace __transform {
noexcept(is_nothrow_constructible_v<decay_t<_Fn>, _Fn>) noexcept(is_nothrow_constructible_v<decay_t<_Fn>, _Fn>)
{ return __range_adaptor_closure_t(_VSTD::__bind_back(*this, _VSTD::forward<_Fn>(__f))); } { return __range_adaptor_closure_t(_VSTD::__bind_back(*this, _VSTD::forward<_Fn>(__f))); }
}; };
} } // namespace __transform
inline namespace __cpo { inline namespace __cpo {
inline constexpr auto transform = __transform::__fn{}; inline constexpr auto transform = __transform::__fn{};
} } // namespace __cpo
} // namespace views } // namespace views
} // namespace ranges } // namespace ranges

View File

@ -186,7 +186,7 @@ public:
} }
}; };
} } // namespace ranges
#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS) #endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)

View File

@ -156,7 +156,8 @@ template <class _Integer>
template <class _Integer, class = _EnableByteOverload<_Integer> > template <class _Integer, class = _EnableByteOverload<_Integer> >
_LIBCPP_NODISCARD_EXT constexpr _Integer _LIBCPP_NODISCARD_EXT constexpr _Integer
to_integer(byte __b) noexcept { return static_cast<_Integer>(__b); } to_integer(byte __b) noexcept { return static_cast<_Integer>(__b); }
}
} // namespace std
#endif #endif

View File

@ -1252,7 +1252,7 @@ template <class _Tp, class... _Types>
using __best_match_t = using __best_match_t =
typename invoke_result_t<_MakeOverloads<_Types...>, _Tp, _Tp>::type; typename invoke_result_t<_MakeOverloads<_Types...>, _Tp, _Tp>::type;
} // __variant_detail } // namespace __variant_detail
template <class... _Types> template <class... _Types>
class _LIBCPP_TEMPLATE_VIS variant class _LIBCPP_TEMPLATE_VIS variant