[llvm] r207082 - [ADT] Try to appease MSVC by sinking the enable_if from a default

Chandler Carruth chandlerc at gmail.com
Wed Apr 23 23:16:12 PDT 2014


Author: chandlerc
Date: Thu Apr 24 01:16:12 2014
New Revision: 207082

URL: http://llvm.org/viewvc/llvm-project?rev=207082&view=rev
Log:
[ADT] Try to appease MSVC by sinking the enable_if from a default
template argument to a default argument to the constructor.

Modified:
    llvm/trunk/include/llvm/ADT/iterator.h

Modified: llvm/trunk/include/llvm/ADT/iterator.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/iterator.h?rev=207082&r1=207081&r2=207082&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/iterator.h (original)
+++ llvm/trunk/include/llvm/ADT/iterator.h Thu Apr 24 01:16:12 2014
@@ -109,13 +109,14 @@ protected:
 
   iterator_adaptor_base() {}
 
-  template <
-      typename U,
-      typename = typename std::enable_if<
+  template <typename U>
+  explicit iterator_adaptor_base(
+      U &&u,
+      typename std::enable_if<
           !std::is_base_of<typename std::remove_cv<
                                typename std::remove_reference<U>::type>::type,
-                           DerivedT>::value>::type>
-  explicit iterator_adaptor_base(U &&u)
+                           DerivedT>::value,
+          int>::type = 0)
       : I(std::forward<U &&>(u)) {}
 
 public:





More information about the llvm-commits mailing list