Skip to content

Commit 2a3f59c

Browse files
Avoid reopening namespace std
1 parent af67bc6 commit 2a3f59c

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

include/Beman/Optional26/optional.hpp

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
/*
88
22.5.2 Header <optional> synopsis[optional.syn]
9-
🔗
109
1110
#include <compare> // see [compare.syn]
1211
@@ -210,23 +209,20 @@ class optional;
210209

211210
} // namespace beman::optional26
212211

213-
namespace std {
214212
// Since P3168R2: Give std::optional Range Support.
215213
template <typename T>
216-
inline constexpr bool ranges::enable_view<beman::optional26::optional<T>> = true;
214+
inline constexpr bool std::ranges::enable_view<beman::optional26::optional<T>> = true;
217215

218216
// TODO: document why this is needed.
219217
template <typename T>
220-
inline constexpr bool ranges::enable_borrowed_range<beman::optional26::optional<T&>> = true;
218+
inline constexpr bool std::ranges::enable_borrowed_range<beman::optional26::optional<T&>> = true;
221219

222220
// Since P3168R2: Give std::optional Range Support.
223221
#if defined(__cpp_lib_format_ranges)
224222
template <class T>
225-
inline constexpr auto format_kind<beman::optional26::optional<T>> = range_format::disabled;
223+
inline constexpr auto std::format_kind<beman::optional26::optional<T>> = range_format::disabled;
226224
#endif
227225

228-
} // namespace std
229-
230226
namespace beman::optional26 {
231227
template <class T>
232228
concept is_derived_from_optional = requires(const T& t) { []<class U>(const optional<U>&) {}(t); };

0 commit comments

Comments
 (0)