diff --git a/extra/boost_unordered_printers.py b/extra/boost_unordered_printers.py index 5185f03b0..f9d95ccc4 100644 --- a/extra/boost_unordered_printers.py +++ b/extra/boost_unordered_printers.py @@ -1,4 +1,4 @@ -# Copyright 2024 Braden Ganetsky +# Copyright 2024-2025 Braden Ganetsky # Distributed under the Boost Software License, Version 1.0. # https://www.boost.org/LICENSE_1_0.txt @@ -191,8 +191,8 @@ def is_sentinel(self, group, pos): m = group["m"] at = lambda b: BoostUnorderedHelpers.maybe_unwrap_atomic(m[b]["n"]) - N = group["N"] - sentinel_ = group["sentinel_"] + N = 15 # `group["N"]` may be optimized out + sentinel_ = 1 # `group["sentinel_"]` may be optimized out if self.is_regular_layout(group): return pos == N-1 and at(N-1) == sentinel_ else: @@ -234,7 +234,7 @@ def generator(): mask = (self.match_occupied(pc_.cast(groups.type).dereference()) >> (n0+1)) << (n0+1) while mask == 0: pc_ = self.cpo.next(pc_, groups.dereference().type.sizeof) - p_ = self.cpo.next(p_, groups.dereference()["N"]) + p_ = self.cpo.next(p_, 15) # Use 15 because `groups.dereference()["N"]` may be optimized out mask = self.match_occupied(pc_.cast(groups.type).dereference()) n = BoostUnorderedHelpers.countr_zero(mask) diff --git a/include/boost/unordered/detail/foa/core.hpp b/include/boost/unordered/detail/foa/core.hpp index ee6cb9270..fab358669 100644 --- a/include/boost/unordered/detail/foa/core.hpp +++ b/include/boost/unordered/detail/foa/core.hpp @@ -29,7 +29,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/include/boost/unordered/detail/implementation.hpp b/include/boost/unordered/detail/implementation.hpp index d2c0cbd05..27e88187d 100644 --- a/include/boost/unordered/detail/implementation.hpp +++ b/include/boost/unordered/detail/implementation.hpp @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include #include diff --git a/include/boost/unordered/unordered_printers.hpp b/include/boost/unordered/detail/unordered_printers.hpp similarity index 97% rename from include/boost/unordered/unordered_printers.hpp rename to include/boost/unordered/detail/unordered_printers.hpp index a7d0d1376..3738a0862 100644 --- a/include/boost/unordered/unordered_printers.hpp +++ b/include/boost/unordered/detail/unordered_printers.hpp @@ -1,11 +1,11 @@ -// Copyright 2024 Braden Ganetsky +// Copyright 2024-2025 Braden Ganetsky // Distributed under the Boost Software License, Version 1.0. // https://www.boost.org/LICENSE_1_0.txt -// Generated on 2024-08-25T17:48:54 +// Generated on 2025-08-08T03:43:17 -#ifndef BOOST_UNORDERED_UNORDERED_PRINTERS_HPP -#define BOOST_UNORDERED_UNORDERED_PRINTERS_HPP +#ifndef BOOST_UNORDERED_DETAIL_UNORDERED_PRINTERS_HPP +#define BOOST_UNORDERED_DETAIL_UNORDERED_PRINTERS_HPP #ifndef BOOST_ALL_NO_EMBEDDED_GDB_SCRIPTS #if defined(__ELF__) @@ -14,7 +14,7 @@ #pragma clang diagnostic ignored "-Woverlength-strings" #endif __asm__(".pushsection \".debug_gdb_scripts\", \"MS\",%progbits,1\n" - ".ascii \"\\4gdb.inlined-script.BOOST_UNORDERED_UNORDERED_PRINTERS_HPP\\n\"\n" + ".ascii \"\\4gdb.inlined-script.BOOST_UNORDERED_DETAIL_UNORDERED_PRINTERS_HPP\\n\"\n" ".ascii \"import gdb.printing\\n\"\n" ".ascii \"import gdb.xmethod\\n\"\n" ".ascii \"import re\\n\"\n" @@ -204,8 +204,8 @@ __asm__(".pushsection \".debug_gdb_scripts\", \"MS\",%progbits,1\n" ".ascii \" m = group[\\\"m\\\"]\\n\"\n" ".ascii \" at = lambda b: BoostUnorderedHelpers.maybe_unwrap_atomic(m[b][\\\"n\\\"])\\n\"\n" - ".ascii \" N = group[\\\"N\\\"]\\n\"\n" - ".ascii \" sentinel_ = group[\\\"sentinel_\\\"]\\n\"\n" + ".ascii \" N = 15 # `group[\\\"N\\\"]` may be optimized out\\n\"\n" + ".ascii \" sentinel_ = 1 # `group[\\\"sentinel_\\\"]` may be optimized out\\n\"\n" ".ascii \" if self.is_regular_layout(group):\\n\"\n" ".ascii \" return pos == N-1 and at(N-1) == sentinel_\\n\"\n" ".ascii \" else:\\n\"\n" @@ -247,7 +247,7 @@ __asm__(".pushsection \".debug_gdb_scripts\", \"MS\",%progbits,1\n" ".ascii \" mask = (self.match_occupied(pc_.cast(groups.type).dereference()) >> (n0+1)) << (n0+1)\\n\"\n" ".ascii \" while mask == 0:\\n\"\n" ".ascii \" pc_ = self.cpo.next(pc_, groups.dereference().type.sizeof)\\n\"\n" - ".ascii \" p_ = self.cpo.next(p_, groups.dereference()[\\\"N\\\"])\\n\"\n" + ".ascii \" p_ = self.cpo.next(p_, 15) # Use 15 because `groups.dereference()[\\\"N\\\"]` may be optimized out\\n\"\n" ".ascii \" mask = self.match_occupied(pc_.cast(groups.type).dereference())\\n\"\n" ".ascii \" n = BoostUnorderedHelpers.countr_zero(mask)\\n\"\n" @@ -411,4 +411,4 @@ __asm__(".pushsection \".debug_gdb_scripts\", \"MS\",%progbits,1\n" #endif // defined(__ELF__) #endif // !defined(BOOST_ALL_NO_EMBEDDED_GDB_SCRIPTS) -#endif // !defined(BOOST_UNORDERED_UNORDERED_PRINTERS_HPP) +#endif // !defined(BOOST_UNORDERED_DETAIL_UNORDERED_PRINTERS_HPP)