moved detectors and zmqSocket to unique pointers

This commit is contained in:
Erik Frojdh
2018-10-10 11:55:37 +02:00
parent 9ca163dfc9
commit d685cb8ff4
3 changed files with 55 additions and 60 deletions

View File

@ -7,9 +7,18 @@
#include <type_traits>
#include <vector>
#include <sstream>
#include <memory>
namespace sls {
// C++11 make_unique implementation for exeption safety
// already available as std::make_unique in C++14
template <typename T, typename... Args>
std::unique_ptr<T> make_unique(Args &&... args) {
return std::unique_ptr<T>(new T(std::forward<Args>(args)...));
}
template <typename T>
bool allEqual(const std::vector<T>& container)
{