From 1ea8cd128c11746d9ee18af1dc4b3d3d516b7296 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20DELRIEU?= Date: Fri, 7 Sep 2018 12:15:35 +0200 Subject: [PATCH] fix void_t for older compilers --- include/nlohmann/detail/meta/void_t.hpp | 7 +++++-- single_include/nlohmann/json.hpp | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/include/nlohmann/detail/meta/void_t.hpp b/include/nlohmann/detail/meta/void_t.hpp index 66c4a359..2528ea84 100644 --- a/include/nlohmann/detail/meta/void_t.hpp +++ b/include/nlohmann/detail/meta/void_t.hpp @@ -4,7 +4,10 @@ namespace nlohmann { namespace detail { -template -using void_t = void; +template struct make_void +{ + using type = void; +}; +template using void_t = typename make_void::type; } } diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp index 9984f14e..bb03b522 100644 --- a/single_include/nlohmann/json.hpp +++ b/single_include/nlohmann/json.hpp @@ -3572,8 +3572,11 @@ namespace nlohmann { namespace detail { -template -using void_t = void; +template struct make_void +{ + using type = void; +}; +template using void_t = typename make_void::type; } }