Remove unused make_shared from stdshims.h

This commit is contained in:
Johannes Lorenz
2020-10-03 12:14:12 +02:00
committed by Johannes Lorenz
parent 16db33f2bf
commit 783db3e457

View File

@@ -4,33 +4,9 @@
#ifndef STDSHIMS_H
#define STDSHIMS_H
#include <memory>
#include <type_traits>
#include <utility>
#if (__cplusplus >= 201402L || _MSC_VER)
#ifndef _MSC_VER
#warning "This part of this file should now be removed! The functions it provides are part of the C++14 standard."
#endif
using std::make_unique;
#else
/// Shim for http://en.cppreference.com/w/cpp/memory/unique_ptr/make_unique
template<typename T, typename... Args>
std::unique_ptr<T> make_unique(Args&&... args)
{
return std::unique_ptr<T>(new T(std::forward<Args>(args)...));
}
//! Overload for the case a deleter should be specified
template<typename T, typename Deleter, typename... Args>
std::unique_ptr<T, Deleter> make_unique(Args&&... args)
{
return std::unique_ptr<T, Deleter>(new T(std::forward<Args>(args)...));
}
#endif
#if (__cplusplus >= 201703L || _MSC_VER >= 1914)
#ifndef _MSC_VER
#warning "This part of this file should now be removed! The functions it provides are part of the C++17 standard."