(ixwebsocket) use a C++11 compatible make_unique shim

This commit is contained in:
Benjamin Sergeant
2020-11-15 09:56:37 -08:00
parent 738c6040f7
commit 8f5134528b
10 changed files with 68 additions and 39 deletions

18
ixwebsocket/IXUniquePtr.h Normal file
View File

@ -0,0 +1,18 @@
/*
* IXUniquePtr.h
* Author: Benjamin Sergeant
* Copyright (c) 2020 Machine Zone, Inc. All rights reserved.
*/
#pragma once
#include <memory>
namespace ix
{
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 ix