C++ PATCH to forbid use of bool with the ++ operator

Jonathan Wakely jwakely@redhat.com
Thu Sep 15 10:18:00 GMT 2016


On 14/09/16 17:28 +0200, Marek Polacek wrote:
>diff --git gcc/libstdc++-v3/testsuite/23_containers/vector/debug/insert6_neg.cc gcc/libstdc++-v3/testsuite/23_containers/vector/debug/insert6_neg.cc
>index 9893293..c939c22 100644
>--- gcc/libstdc++-v3/testsuite/23_containers/vector/debug/insert6_neg.cc
>+++ gcc/libstdc++-v3/testsuite/23_containers/vector/debug/insert6_neg.cc
>@@ -16,6 +16,7 @@
> // <http://www.gnu.org/licenses/>.
> //
> // { dg-do run { xfail *-*-* } }
>+// { dg-options "-Wno-deprecated" }
>
> #include <vector>
> #include <debug/vector>

I'm replacing this part with a fix to avoid incrementing bool in the
testsuite, because otherwise generate_unique<bool>::build() only ever
returns true. This way it still doesn't return unique values, but at
least it alternates between true and false, and is valid for C++17.

Tested x86_64-linux, committed to trunk.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.txt
Type: text/x-patch
Size: 1419 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20160915/dfa2cbca/attachment.bin>


More information about the Libstdc++ mailing list