Refactor FairMQTools

* Split header, add common header
  * Transform to canonical namespace
  * Deprecate old header
  * Adapt to new Tools.h
This commit is contained in:
Dennis Klein
2017-05-18 16:53:02 +02:00
committed by Mohammad Al-Turany
parent 9215c81362
commit d2c78479f0
7 changed files with 210 additions and 126 deletions

32
fairmq/tools/CppSTL.h Normal file
View 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 */