forked from pool/nghttp2
- Add nghttp2-c++14.patch to properly guard make_unique templates. [bsc#964140] OBS-URL: https://build.opensuse.org/request/show/356634 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/nghttp2?expand=0&rev=49
21 lines
565 B
Diff
21 lines
565 B
Diff
--- 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>
|