[flang] make the ctor use special type deduction so members can be moved and
authorEric Schweitz <eschweitz@nvidia.com>
Tue, 9 Apr 2019 18:03:33 +0000 (11:03 -0700)
committerEric Schweitz <eschweitz@nvidia.com>
Tue, 9 Apr 2019 18:36:42 +0000 (11:36 -0700)
copied in the same call

Original-commit: flang-compiler/f18@d18e8391fc9def0cf0abc54bb3bb1b68a0779764
Reviewed-on: https://github.com/flang-compiler/f18/pull/393

flang/lib/FIR/mixin.h

index 5a98e85..9ec9105 100644 (file)
@@ -69,7 +69,8 @@ template<typename... Ts> struct SumTypeCopyMixin {
 template<typename... Ts> struct ProductTypeMixin {
   using ProductTypeTrait = std::true_type;
   ProductTypeMixin(const Ts &... x) : t{x...} {}
-  ProductTypeMixin(Ts &&... x) : t{std::forward<Ts>(x)...} {}
+  template<typename... As>
+  ProductTypeMixin(As &&... x) : t{std::forward<As>(x)...} {}
   ProductTypeMixin(ProductTypeMixin &&) = default;
   ProductTypeMixin &operator=(ProductTypeMixin &&) = default;
   ProductTypeMixin(const ProductTypeMixin &) = delete;