forked from OSchip/llvm-project
[flang] make the ctor use special type deduction so members can be moved and
copied in the same call Original-commit: flang-compiler/f18@d18e8391fc Reviewed-on: https://github.com/flang-compiler/f18/pull/393
This commit is contained in:
parent
2f64d464d5
commit
253f361152
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue