mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-15 09:31:45 +00:00
Refactor FairMQTools
* Split header, add common header * Transform to canonical namespace * Deprecate old header * Adapt to new Tools.h
This commit is contained in:
committed by
Mohammad Al-Turany
parent
9215c81362
commit
d2c78479f0
32
fairmq/tools/CppSTL.h
Normal file
32
fairmq/tools/CppSTL.h
Normal file
@@ -0,0 +1,32 @@
|
||||
/********************************************************************************
|
||||
* Copyright (C) 2017 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
|
||||
* *
|
||||
* This software is distributed under the terms of the *
|
||||
* GNU Lesser General Public Licence (LGPL) version 3, *
|
||||
* copied verbatim in the file "LICENSE" *
|
||||
********************************************************************************/
|
||||
|
||||
#ifndef FAIR_MQ_TOOLS_CPPSTL_H
|
||||
#define FAIR_MQ_TOOLS_CPPSTL_H
|
||||
|
||||
#include <memory>
|
||||
|
||||
namespace fair
|
||||
{
|
||||
namespace mq
|
||||
{
|
||||
namespace tools
|
||||
{
|
||||
|
||||
// make_unique implementation, until C++14 is default
|
||||
template<typename T, typename ...Args>
|
||||
std::unique_ptr<T> make_unique(Args&& ...args)
|
||||
{
|
||||
return std::unique_ptr<T>(new T(std::forward<Args>(args)...));
|
||||
}
|
||||
|
||||
} /* namespace tools */
|
||||
} /* namespace mq */
|
||||
} /* namespace fair */
|
||||
|
||||
#endif /* FAIR_MQ_TOOLS_CPPSTL_H */
|
Reference in New Issue
Block a user