Hi
I think I never got feedback for this patch, ok to commit ?
François
On 10/12/26 07:20, François Dumont wrote:
Hi
I tried but failed to found a good solution to the not C++ Standard
conforming __gnu_debug implementation of inplace_vector.
So I'd like to propose to keep the implementation only for explicit
usage through #include <debug/inplace_vector> and use of
__gnu_debug::inplace_vector. Clearly that's a much more limited use
cases.
libstdc++ [_GLIBCXX_DEBUG] Remove std::inplace_vector alias
The _GLIBCXX_DEBUG implementation of std::inplace_vector cannot
fully comply
to the C++ Standard. Due to the additional state to store
container's iterators
the constructors cannot be made trivial when C++ Standard imposed
them to be.
Keep __gnu_debug::inplace_vector as a possible replacement of the
std::inplace_vector
accessible by including <debug/inplace_vector>.
libstdc++-v3/ChangeLog:
* include/debug/inplace_vector: Move the class to the
__gnu_debug namespace.
Adapt to add the now necessary 'std::'.
* include/std/inplace_vector: Remove the
_GLIBCXX_BEGIN_NAMESPACE_CONTAINER
_GLIBCXX_END_NAMESPACE_CONTAINER enclosing namespace.
(erase_if, erase): Adapt to take std::inplace_vector.
* testsuite/23_containers/inplace_vector/copy.cc: Remove
_GLIBCXX_DEBUG checks.
* testsuite/23_containers/inplace_vector/move.cc: Likewise.
*
testsuite/23_containers/inplace_vector/debug/assign1_neg.cc: Run test
directly on __gnu_debug::inplace_vector.
*
testsuite/23_containers/inplace_vector/debug/assign2_neg.cc: Likewise.
*
testsuite/23_containers/inplace_vector/debug/assign3_neg.cc: Likewise.
*
testsuite/23_containers/inplace_vector/debug/construct1_neg.cc: Likewise.
*
testsuite/23_containers/inplace_vector/debug/construct2_neg.cc: Likewise.
*
testsuite/23_containers/inplace_vector/debug/construct3_neg.cc: Likewise.
*
testsuite/23_containers/inplace_vector/debug/debug_functions.cc:
Likewise.
* testsuite/23_containers/inplace_vector/debug/erase.cc:
Likewise.
*
testsuite/23_containers/inplace_vector/debug/insert1_neg.cc: Likewise.
*
testsuite/23_containers/inplace_vector/debug/insert2_neg.cc: Likewise.
*
testsuite/23_containers/inplace_vector/debug/insert3_neg.cc: Likewise.
*
testsuite/23_containers/inplace_vector/debug/insert5_neg.cc: Likewise.
* testsuite/23_containers/inplace_vector/debug/erasure.cc:
New test case.
* testsuite/util/debug/checks.h: Allow usage of all checks
even if _GLIBCXX_DEBUG
is not defined. Include the debug/ headers unconditionnally.
(check_assign3): Use explicitely __gnu_debug::list.
(check_construct3): Likewise.
(check_insert3): Likewise.
Tested under Linux x86_64 on testsuite/23_containers/inplace_vector/*.
Ok to commit ?
François