[llvm] r284570 - DenseSet: Appease msc18 to define derived constructors explicitly.
NAKAMURA Takumi via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 18 22:43:17 PDT 2016
Author: chapuni
Date: Wed Oct 19 00:43:17 2016
New Revision: 284570
URL: http://llvm.org/viewvc/llvm-project?rev=284570&view=rev
Log:
DenseSet: Appease msc18 to define derived constructors explicitly.
msc18 doesn't recognize "using BaseT::BaseT;"
llvm\include\llvm/ADT/DenseSet.h(213) : error C2875: using-declaration causes a multiple declaration of 'BaseT'
llvm\include\llvm/ADT/DenseSet.h(214) : see reference to class template instantiation 'llvm::DenseSet<ValueT,ValueInfoT>' being compiled
llvm\include\llvm/ADT/DenseSet.h(231) : error C2875: using-declaration causes a multiple declaration of 'BaseT'
llvm\include\llvm/ADT/DenseSet.h(232) : see reference to class template instantiation 'llvm::SmallDenseSet<ValueT,InlineBuckets,ValueInfoT>' being compiled
Modified:
llvm/trunk/include/llvm/ADT/DenseSet.h
Modified: llvm/trunk/include/llvm/ADT/DenseSet.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/DenseSet.h?rev=284570&r1=284569&r2=284570&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/DenseSet.h (original)
+++ llvm/trunk/include/llvm/ADT/DenseSet.h Wed Oct 19 00:43:17 2016
@@ -210,7 +210,13 @@ class DenseSet : public detail::DenseSet
ValueInfoT>;
public:
+#if defined(_MSC_VER) && _MSC_VER < 1900
+ explicit DenseSet(unsigned InitialReserve = 0)
+ : DenseSetImpl(InitialReserve) {}
+ DenseSet(std::initializer_list<ValueT> Elems) : DenseSetImpl(Elems) {}
+#else
using BaseT::BaseT;
+#endif
};
/// Implements a dense probed hash-table based set with some number of buckets
@@ -228,7 +234,13 @@ class SmallDenseSet
ValueInfoT>;
public:
+#if defined(_MSC_VER) && _MSC_VER < 1900
+ explicit SmallDenseSet(unsigned InitialReserve = 0)
+ : DenseSetImpl(InitialReserve) {}
+ SmallDenseSet(std::initializer_list<ValueT> Elems) : DenseSetImpl(Elems) {}
+#else
using BaseT::BaseT;
+#endif
};
} // end namespace llvm
More information about the llvm-commits
mailing list