[llvm] r284570 - DenseSet: Appease msc18 to define derived constructors explicitly.

NAKAMURA Takumi via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 20 18:23:04 PDT 2016


I didn't noticed since I am too behind of llvmdev.

On Thu, Oct 20, 2016 at 8:23 AM Reid Kleckner <rnk at google.com> wrote:

> r284661
>
> On Wed, Oct 19, 2016 at 3:36 PM, Reid Kleckner <rnk at google.com> wrote:
>
> I'm going to revert this, MSVC 2013 (_MSC_VER < 1900) is no longer
> supported as of Oct 15. Please upgrade to MSVC 2015.
>
> On Tue, Oct 18, 2016 at 10:43 PM, NAKAMURA Takumi via llvm-commits <
> llvm-commits at lists.llvm.org> wrote:
>
> 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
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161021/0898e69b/attachment.html>


More information about the llvm-commits mailing list