[llvm] r269501 - Another attempt to fix MSVC by explicitly disabling the conversion
Chandler Carruth via llvm-commits
llvm-commits at lists.llvm.org
Fri May 13 15:20:44 PDT 2016
Author: chandlerc
Date: Fri May 13 17:20:43 2016
New Revision: 269501
URL: http://llvm.org/viewvc/llvm-project?rev=269501&view=rev
Log:
Another attempt to fix MSVC by explicitly disabling the conversion
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.
Modified:
llvm/trunk/include/llvm/ADT/Sequence.h
Modified: llvm/trunk/include/llvm/ADT/Sequence.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/Sequence.h?rev=269501&r1=269500&r2=269501&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/Sequence.h (original)
+++ llvm/trunk/include/llvm/ADT/Sequence.h Fri May 13 17:20:43 2016
@@ -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) {
More information about the llvm-commits
mailing list