On Mon, 8 Nov 2021 at 21:36, François Dumont <frs.dum...@gmail.com> wrote:

> Yet another version this time with only 1 guard implementation. The
> predicate to invalidate the safe iterators has been externalized.
>
> Ok to commit ?
>

I like this version a lot - thanks for persisting with it.

OK to commit, thanks.


As an aside ...

--- a/libstdc++-v3/testsuite/util/testsuite_abi.h
+++ b/libstdc++-v3/testsuite/util/testsuite_abi.h
@@ -24,7 +24,11 @@
 #include <locale>
 #if __cplusplus >= 201103L
 # include <unordered_map>
+# ifdef _GLIBCXX_DEBUG
+namespace unord = std::_GLIBCXX_STD_C;
+# else
 namespace unord = std;
+# endif
 #else
 # include <tr1/unordered_map>
 namespace unord = std::tr1;


Several times I've been annoyed by the fact that we don't have a way to
refer to std::_GLIBCXX_STD_C::vector etc. that is always valid, in normal
mode and debug mode.

Maybe we should add:

namespace std { namespace _GLIBCXX_STD_C = ::std; }

That way we can refer to std::_GLIBCXX_STD_C::foo in normal mode, and it
will mean the same thing as in debug mode. So we don't need to use #if
conditions like this.

Reply via email to