From 802f1e1eec328f2810a796f1ee06beb3312768c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Me=C3=9Fmer?= Date: Tue, 18 Dec 2018 13:41:47 -0800 Subject: [PATCH] Fix void_t for older compilers --- flat_hash_map.hpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/flat_hash_map.hpp b/flat_hash_map.hpp index a8723ee..47ab30e 100644 --- a/flat_hash_map.hpp +++ b/flat_hash_map.hpp @@ -263,7 +263,10 @@ inline size_t next_power_of_two(size_t i) return i; } -template using void_t = void; +// Implementation taken from http://en.cppreference.com/w/cpp/types/void_t +// (it takes CWG1558 into account and also works for older compilers) +template struct make_void { typedef void type;}; +template using void_t = typename make_void::type; template struct HashPolicySelector