Skip to content

Commit 9c52a19

Browse files
committed
[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
1 parent 93ee588 commit 9c52a19

File tree

13 files changed

+23
-22
lines changed

13 files changed

+23
-22
lines changed

libcxx/include/__functional/function.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1664,7 +1664,7 @@ __func<_Fp, _Alloc, _Rp(_A0, _A1, _A2)>::target_type() const
16641664

16651665
#endif // _LIBCPP_NO_RTTI
16661666

1667-
} // __function
1667+
} // namespace __function
16681668

16691669
template<class _Rp>
16701670
class _LIBCPP_TEMPLATE_VIS function<_Rp()>

libcxx/include/__ranges/access.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ namespace __begin {
8383

8484
void operator()(auto&&) const = delete;
8585
};
86-
}
86+
} // namespace __begin
8787

8888
inline namespace __cpo {
8989
inline constexpr auto begin = __begin::__fn{};
@@ -150,7 +150,7 @@ namespace __end {
150150

151151
void operator()(auto&&) const = delete;
152152
};
153-
}
153+
} // namespace __end
154154

155155
inline namespace __cpo {
156156
inline constexpr auto end = __end::__fn{};
@@ -178,7 +178,7 @@ namespace __cbegin {
178178
-> decltype( ranges::begin(static_cast<const _Tp&&>(__t)))
179179
{ return ranges::begin(static_cast<const _Tp&&>(__t)); }
180180
};
181-
}
181+
} // namespace __cbegin
182182

183183
inline namespace __cpo {
184184
inline constexpr auto cbegin = __cbegin::__fn{};
@@ -206,7 +206,7 @@ namespace __cend {
206206
-> decltype( ranges::end(static_cast<const _Tp&&>(__t)))
207207
{ return ranges::end(static_cast<const _Tp&&>(__t)); }
208208
};
209-
}
209+
} // namespace __cend
210210

211211
inline namespace __cpo {
212212
inline constexpr auto cend = __cend::__fn{};

libcxx/include/__ranges/all.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ namespace __all {
6464
return ranges::owning_view{_VSTD::forward<_Tp>(__t)};
6565
}
6666
};
67-
}
67+
} // namespace __all
6868

6969
inline namespace __cpo {
7070
inline constexpr auto all = __all::__fn{};

libcxx/include/__ranges/common_view.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,11 +120,11 @@ namespace __common {
120120
-> decltype( common_view{_VSTD::forward<_Range>(__range)})
121121
{ return common_view{_VSTD::forward<_Range>(__range)}; }
122122
};
123-
}
123+
} // namespace __common
124124

125125
inline namespace __cpo {
126126
inline constexpr auto common = __common::__fn{};
127-
}
127+
} // namespace __cpo
128128
} // namespace views
129129
} // namespace ranges
130130

libcxx/include/__ranges/data.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ namespace __data {
6464
return _VSTD::to_address(ranges::begin(__t));
6565
}
6666
};
67-
}
67+
} // namespace __data
6868

6969
inline namespace __cpo {
7070
inline constexpr auto data = __data::__fn{};
@@ -92,7 +92,7 @@ namespace __cdata {
9292
-> decltype( ranges::data(static_cast<const _Tp&&>(__t)))
9393
{ return ranges::data(static_cast<const _Tp&&>(__t)); }
9494
};
95-
}
95+
} // namespace __cdata
9696

9797
inline namespace __cpo {
9898
inline constexpr auto cdata = __cdata::__fn{};

libcxx/include/__ranges/empty.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ namespace __empty {
6868
return ranges::begin(__t) == ranges::end(__t);
6969
}
7070
};
71-
}
71+
} // namespace __empty
7272

7373
inline namespace __cpo {
7474
inline constexpr auto empty = __empty::__fn{};

libcxx/include/__ranges/iota_view.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ namespace __iota {
397397

398398
inline namespace __cpo {
399399
inline constexpr auto iota = __iota::__fn{};
400-
}
400+
} // namespace __cpo
401401
} // namespace views
402402
} // namespace ranges
403403

libcxx/include/__ranges/reverse_view.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,11 +175,11 @@ namespace ranges {
175175
-> decltype( reverse_view{_VSTD::forward<_Range>(__range)})
176176
{ return reverse_view{_VSTD::forward<_Range>(__range)}; }
177177
};
178-
}
178+
} // namespace __reverse
179179

180180
inline namespace __cpo {
181181
inline constexpr auto reverse = __reverse::__fn{};
182-
}
182+
} // namespace __cpo
183183
} // namespace views
184184
} // namespace ranges
185185

libcxx/include/__ranges/size.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
2929
namespace ranges {
3030
template<class>
3131
inline constexpr bool disable_sized_range = false;
32-
}
32+
} // namespace ranges
3333

3434
// [range.prim.size]
3535

@@ -97,7 +97,7 @@ namespace __size {
9797
return _VSTD::__to_unsigned_like(ranges::end(__t) - ranges::begin(__t));
9898
}
9999
};
100-
}
100+
} // namespace __size
101101

102102
inline namespace __cpo {
103103
inline constexpr auto size = __size::__fn{};
@@ -121,7 +121,7 @@ namespace __ssize {
121121
return static_cast<_Signed>(ranges::size(__t));
122122
}
123123
};
124-
}
124+
} // namespace __ssize
125125

126126
inline namespace __cpo {
127127
inline constexpr auto ssize = __ssize::__fn{};

libcxx/include/__ranges/transform_view.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -424,11 +424,11 @@ namespace __transform {
424424
noexcept(is_nothrow_constructible_v<decay_t<_Fn>, _Fn>)
425425
{ return __range_adaptor_closure_t(_VSTD::__bind_back(*this, _VSTD::forward<_Fn>(__f))); }
426426
};
427-
}
427+
} // namespace __transform
428428

429429
inline namespace __cpo {
430430
inline constexpr auto transform = __transform::__fn{};
431-
}
431+
} // namespace __cpo
432432
} // namespace views
433433

434434
} // namespace ranges

libcxx/include/__ranges/view_interface.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ class view_interface {
186186
}
187187
};
188188

189-
}
189+
} // namespace ranges
190190

191191
#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
192192

libcxx/include/cstddef

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,8 @@ template <class _Integer>
156156
template <class _Integer, class = _EnableByteOverload<_Integer> >
157157
_LIBCPP_NODISCARD_EXT constexpr _Integer
158158
to_integer(byte __b) noexcept { return static_cast<_Integer>(__b); }
159-
}
159+
160+
} // namespace std
160161

161162
#endif
162163

libcxx/include/variant

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1252,7 +1252,7 @@ template <class _Tp, class... _Types>
12521252
using __best_match_t =
12531253
typename invoke_result_t<_MakeOverloads<_Types...>, _Tp, _Tp>::type;
12541254

1255-
} // __variant_detail
1255+
} // namespace __variant_detail
12561256

12571257
template <class... _Types>
12581258
class _LIBCPP_TEMPLATE_VIS variant

0 commit comments

Comments
 (0)