Skip to content

Commit

Permalink
Remove unused make_shared from stdshims.h
Browse files Browse the repository at this point in the history
  • Loading branch information
JohannesLorenz committed Oct 4, 2020
1 parent 16db33f commit 783db3e
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions include/stdshims.h
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down

0 comments on commit 783db3e

Please sign in to comment.