From c16eb098d5a24234b9cc7e34bb3c49bb21e043f6 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Fri, 25 May 2018 12:34:33 +0800 Subject: [PATCH] denc: specialize for denc(const T&, size_t&, uint64_t) otherwise GCC complains that 'unsigned long int' is not a class or namespace when trying to materialize is_const_iterator_v<>. not sure why SFINAE does not work here, though. Signed-off-by: Kefu Chai --- src/include/denc.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/include/denc.h b/src/include/denc.h index cd8a43360678a..f80f1a0c4c46d 100644 --- a/src/include/denc.h +++ b/src/include/denc.h @@ -243,14 +243,16 @@ using underlying_type_t = typename underlying_type::type; } template -struct is_const_iterator { - using pointer = typename It::pointer; - static constexpr bool value = std::is_const_v>; -}; +struct is_const_iterator + : std::conditional_t>, + std::true_type, + std::false_type> +{}; +template<> +struct is_const_iterator : std::false_type {}; template<> -struct is_const_iterator { +struct is_const_iterator : std::false_type { // appender is used for *changing* the buffer - static constexpr bool value = false; }; template inline constexpr bool is_const_iterator_v = is_const_iterator::value; -- 2.39.5