OSDN Git Service

Another attempt to fix MSVC by explicitly disabling the conversion
authorChandler Carruth <chandlerc@gmail.com>
Fri, 13 May 2016 22:20:43 +0000 (22:20 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Fri, 13 May 2016 22:20:43 +0000 (22:20 +0000)
operator when the value type can't be initialized from the argument
type. Testing with the online MSVC compiler is finally happy with this,
let's see if the build bot will tolerate it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269501 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/ADT/Sequence.h

index 62d46fd..5d36831 100644 (file)
@@ -40,7 +40,7 @@ public:
   value_sequence_iterator(value_sequence_iterator &&Arg)
       : Value(std::move(Arg.Value)) {}
 
-  template <typename U>
+  template <typename U, typename Enabler = decltype(ValueT(std::declval<U>()))>
   value_sequence_iterator(U &&Value) : Value(std::forward<U>(Value)) {}
 
   value_sequence_iterator &operator+=(difference_type N) {