From: NAKAMURA Takumi Date: Wed, 19 Oct 2016 05:43:17 +0000 (+0000) Subject: DenseSet: Appease msc18 to define derived constructors explicitly. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=82188712b611a3a5eecc5316ac1b16c3df4ba5b5;p=llvm 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' 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' being compiled git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284570 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/ADT/DenseSet.h b/include/llvm/ADT/DenseSet.h index b25d3b7cba6..a31c4da3a0e 100644 --- a/include/llvm/ADT/DenseSet.h +++ b/include/llvm/ADT/DenseSet.h @@ -210,7 +210,13 @@ class DenseSet : public detail::DenseSetImpl< ValueInfoT>; public: +#if defined(_MSC_VER) && _MSC_VER < 1900 + explicit DenseSet(unsigned InitialReserve = 0) + : DenseSetImpl(InitialReserve) {} + DenseSet(std::initializer_list 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 Elems) : DenseSetImpl(Elems) {} +#else using BaseT::BaseT; +#endif }; } // end namespace llvm