mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-12 15:25:34 +08:00
refs #584 Moved make_unique to makeunique.h
This commit is contained in:
@@ -13,13 +13,7 @@
|
||||
#define BLACKMISC_FREEFUNCTIONS_H
|
||||
|
||||
#include "blackmisc/blackmiscexport.h"
|
||||
#include "blackmisc/tuple.h"
|
||||
#include "blackmisc/inheritancetraits.h"
|
||||
#include <QDir> // for Q_INIT_RESOURCE
|
||||
#include <QList>
|
||||
#include <QVariant>
|
||||
#include <QMetaType>
|
||||
#include <memory>
|
||||
|
||||
/*!
|
||||
* Workaround, to call initResource from namespace. Used in BlackMisc::initResources().
|
||||
@@ -37,13 +31,6 @@ namespace BlackMisc
|
||||
{
|
||||
//! Init resources
|
||||
BLACKMISC_EXPORT void initResources();
|
||||
|
||||
//! Own implementation of std::make_unique, a C++14 feature not provided by GCC in C++11 mode
|
||||
template<typename T, typename... Args>
|
||||
std::unique_ptr<T> make_unique(Args &&... args)
|
||||
{
|
||||
return std::unique_ptr<T>(new T(std::forward<Args>(args)...));
|
||||
}
|
||||
} // ns
|
||||
}
|
||||
|
||||
#endif // guard
|
||||
|
||||
Reference in New Issue
Block a user