forked from qt-creator/qt-creator
TaskTree: Compile fix on mac
Use brace-enclosed initializer list. Change-Id: I1313132a2a4e3530eccdaf46e22a24549734e94c Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -190,12 +190,12 @@ public:
|
||||
#if __cplusplus >= 201803L // C++20: Allow pack expansion in lambda init-capture.
|
||||
template <typename ...Args>
|
||||
Storage(const Args &...args)
|
||||
: StorageBase([...args = args] { return new StorageStruct(args...); }, Storage::dtor()) {}
|
||||
: StorageBase([...args = args] { return new StorageStruct{args...}; }, Storage::dtor()) {}
|
||||
#else // C++17
|
||||
template <typename ...Args>
|
||||
Storage(const Args &...args)
|
||||
: StorageBase([argsTuple = std::tuple(args...)] {
|
||||
return std::apply([](const Args &...arguments) { return new StorageStruct(arguments...); }, argsTuple);
|
||||
return std::apply([](const Args &...arguments) { return new StorageStruct{arguments...}; }, argsTuple);
|
||||
}, Storage::dtor()) {}
|
||||
#endif
|
||||
StorageStruct &operator*() const noexcept { return *activeStorage(); }
|
||||
|
Reference in New Issue
Block a user