Implement D1957R0, T* to bool should be considered narrowing.
authorJason Merrill <jason@redhat.com>
Sun, 10 Nov 2019 20:30:03 +0000 (15:30 -0500)
committerJason Merrill <jason@gcc.gnu.org>
Sun, 10 Nov 2019 20:30:03 +0000 (15:30 -0500)
commit2806ecbdc8054ef9f3968577806b007baefad4e6
tree144d7a35712fc76f3d1deecbc1d6c139f4bf098d
parent0313a84a2faa8f685eb489fa787f1ea969f68560
Implement D1957R0, T* to bool should be considered narrowing.

This paper was delayed until the February meeting in Prague so that we could
get a better idea of what the impact on existing code would actually be.  To
that end, I'm implementing it now.

* typeck2.c (check_narrowing): Treat pointer->bool as a narrowing
conversion with -std=c++2a.

From-SVN: r278026
gcc/cp/ChangeLog
gcc/cp/typeck2.c
gcc/testsuite/g++.dg/cpp0x/initlist92.C