From 26bbf117727145e2d314ebe136ef392f581c1b5d Mon Sep 17 00:00:00 2001 From: Baptiste Wicht Date: Fri, 21 Feb 2020 19:31:05 +0100 Subject: [PATCH] GCC 9.2.0: Fix in the TSTL --- tstl/include/algorithms.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tstl/include/algorithms.hpp b/tstl/include/algorithms.hpp index 48407757..f020995a 100644 --- a/tstl/include/algorithms.hpp +++ b/tstl/include/algorithms.hpp @@ -189,7 +189,9 @@ void fill_n(ForwardIterator first, size_t count, const T& value){ */ template::value_type>::value && is_integral::value, int> = 42> void fill_n(ForwardIterator first, size_t count, const T& value){ - if(!value){ + // TODO This is definitely not good, should properly compare to zero + bool v{value}; + if(!v){ memclr(reinterpret_cast(first), count * sizeof(decltype(*first))); } else { if(count > 0){