Commit 4e44fccd authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

Fix compile error with gcc-6 which enables C++14 by default

parent 703c77ec
......@@ -38,6 +38,9 @@
namespace nghttp2 {
#if __cplusplus > 201103L
using std::make_unique;
#else // __cplusplus <= 201103L
template <typename T, typename... U>
typename std::enable_if<!std::is_array<T>::value, std::unique_ptr<T>>::type
make_unique(U &&... u) {
......@@ -49,6 +52,7 @@ typename std::enable_if<std::is_array<T>::value, std::unique_ptr<T>>::type
make_unique(size_t size) {
return std::unique_ptr<T>(new typename std::remove_extent<T>::type[size]());
}
#endif // __cplusplus <= 201103L
// std::forward is constexpr since C++14
template <typename... T>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment