fix void_t for older compilers

This commit is contained in:
Théo DELRIEU 2018-09-07 12:15:35 +02:00
parent eb30ff0615
commit 1ea8cd128c
No known key found for this signature in database
GPG key ID: A5A505438C20539A
2 changed files with 10 additions and 4 deletions

View file

@ -4,7 +4,10 @@ namespace nlohmann
{ {
namespace detail namespace detail
{ {
template <typename...> template <typename ...Ts> struct make_void
using void_t = void; {
using type = void;
};
template <typename ...Ts> using void_t = typename make_void<Ts...>::type;
} }
} }

View file

@ -3572,8 +3572,11 @@ namespace nlohmann
{ {
namespace detail namespace detail
{ {
template <typename...> template <typename ...Ts> struct make_void
using void_t = void; {
using type = void;
};
template <typename ...Ts> using void_t = typename make_void<Ts...>::type;
} }
} }