Skip to content

Commit 05d7310

Browse files
committed
Adjust NullablePtr constructor template condition
We're interested in whether the pointers are convertible, not the pointees.
1 parent d142fab commit 05d7310

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/swift/Basic/NullablePtr.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class NullablePtr {
3737
template<typename OtherT>
3838
NullablePtr(NullablePtr<OtherT> Other,
3939
typename std::enable_if<
40-
std::is_convertible<OtherT, T>::value,
40+
std::is_convertible<OtherT *, T *>::value,
4141
PlaceHolder
4242
>::type = PlaceHolder()) : Ptr(Other.getPtrOrNull()) {}
4343

0 commit comments

Comments
 (0)