diff --git a/include/llvm/ADT/iterator.h b/include/llvm/ADT/iterator.h index e29225ad6c2..e64ae9abb9f 100644 --- a/include/llvm/ADT/iterator.h +++ b/include/llvm/ADT/iterator.h @@ -109,13 +109,14 @@ protected: iterator_adaptor_base() {} - template < - typename U, - typename = typename std::enable_if< + template + explicit iterator_adaptor_base( + U &&u, + typename std::enable_if< !std::is_base_of::type>::type, - DerivedT>::value>::type> - explicit iterator_adaptor_base(U &&u) + DerivedT>::value, + int>::type = 0) : I(std::forward(u)) {} public: