From 4e44fccdcf1d0fea6a8cd88916040e06fc75d9db Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Sat, 30 Jan 2016 18:41:27 +0900 Subject: [PATCH] Fix compile error with gcc-6 which enables C++14 by default --- src/template.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/template.h b/src/template.h index 0346034a..b5862d51 100644 --- a/src/template.h +++ b/src/template.h @@ -38,6 +38,9 @@ namespace nghttp2 { +#if __cplusplus > 201103L +using std::make_unique; +#else // __cplusplus <= 201103L template typename std::enable_if::value, std::unique_ptr>::type make_unique(U &&... u) { @@ -49,6 +52,7 @@ typename std::enable_if::value, std::unique_ptr>::type make_unique(size_t size) { return std::unique_ptr(new typename std::remove_extent::type[size]()); } +#endif // __cplusplus <= 201103L // std::forward is constexpr since C++14 template