SHA256
1
0
forked from pool/nghttp2
nghttp2/nghttp2-c++14.patch

21 lines
565 B
Diff
Raw Normal View History

--- src/template.h.orig 2016-01-28 15:30:56.549094834 +0100
+++ src/template.h 2016-01-28 15:42:13.188970636 +0100
@@ -37,6 +37,9 @@
namespace nghttp2 {
+#if __cplusplus > 201103L
+using std::make_unique;
+#else
template <typename T, typename... U>
typename std::enable_if<!std::is_array<T>::value, std::unique_ptr<T>>::type
make_unique(U &&... u) {
@@ -48,6 +51,7 @@
make_unique(size_t size) {
return std::unique_ptr<T>(new typename std::remove_extent<T>::type[size]());
}
+#endif
// std::forward is constexpr since C++14
template <typename... T>