From 86d623a0f499fa983ff0500697c87962ac3a1419 Mon Sep 17 00:00:00 2001 From: Christian Mazakas Date: Fri, 7 Oct 2022 10:55:52 -0700 Subject: [PATCH] Pull mlf into detail::foa namespace for testing --- include/boost/unordered/detail/foa.hpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/boost/unordered/detail/foa.hpp b/include/boost/unordered/detail/foa.hpp index 35a1ad6f..0dbf230f 100644 --- a/include/boost/unordered/detail/foa.hpp +++ b/include/boost/unordered/detail/foa.hpp @@ -778,6 +778,11 @@ void swap_if(T& x,T& y){using std::swap; swap(x,y);} template::type* =nullptr> void swap_if(T&,T&){} +// we pull this out so the tests don't have to rely on a magic constant or +// instantiate the table class template as it can be quite gory +// +constexpr static float const mlf = 0.875f; + #if defined(BOOST_GCC) /* GCC's -Wshadow triggers at scenarios like this: * @@ -1492,7 +1497,6 @@ private: } } - static constexpr float mlf=0.875; std::size_t size_; arrays_type arrays; std::size_t ml;