Skip to content

Commit 41ddf12

Browse files
authored
Remove dangling conversion to optional<T> & (#93385)
1 parent 3b79c82 commit 41ddf12

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

clang/include/clang/Basic/CustomizableOptional.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -97,14 +97,6 @@ template <typename T> class CustomizableOptional {
9797
template <typename U> T value_or(U &&alt) && {
9898
return has_value() ? std::move(operator*()) : std::forward<U>(alt);
9999
}
100-
101-
// Allow conversion to std::optional<T>.
102-
explicit operator std::optional<T> &() const & {
103-
return *this ? **this : std::optional<T>();
104-
}
105-
explicit operator std::optional<T> &&() const && {
106-
return *this ? std::move(**this) : std::optional<T>();
107-
}
108100
};
109101

110102
template <typename T>

0 commit comments

Comments
 (0)