File tree Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -2600,16 +2600,6 @@ bool hasNItemsOrLess(ContainerTy &&C, unsigned N) {
26002600 return hasNItemsOrLess (adl_begin (C), adl_end (C), N);
26012601}
26022602
2603- // / Returns a raw pointer that represents the same address as the argument.
2604- // /
2605- // / This implementation can be removed once we move to C++20 where it's defined
2606- // / as std::to_address().
2607- // /
2608- // / The std::pointer_traits<>::to_address(p) variations of these overloads has
2609- // / not been implemented.
2610- template <class Ptr > auto to_address (const Ptr &P) { return P.operator ->(); }
2611- template <class T > constexpr T *to_address (T *P) { return P; }
2612-
26132603// Detect incomplete types, relying on the fact that their size is unknown.
26142604namespace detail {
26152605template <typename T> using has_sizeof = decltype (sizeof (T));
Original file line number Diff line number Diff line change @@ -134,6 +134,16 @@ struct identity // NOLINT(readability-identifier-naming)
134134 }
135135};
136136
137+ // / Returns a raw pointer that represents the same address as the argument.
138+ // /
139+ // / This implementation can be removed once we move to C++20 where it's defined
140+ // / as std::to_address().
141+ // /
142+ // / The std::pointer_traits<>::to_address(p) variations of these overloads has
143+ // / not been implemented.
144+ template <class Ptr > auto to_address (const Ptr &P) { return P.operator ->(); }
145+ template <class T > constexpr T *to_address (T *P) { return P; }
146+
137147// ===----------------------------------------------------------------------===//
138148// Features from C++23
139149// ===----------------------------------------------------------------------===//
You can’t perform that action at this time.
0 commit comments