PR c++/89836 - bool constant expression and explicit conversions.
authorMarek Polacek <polacek@redhat.com>
Thu, 28 Mar 2019 18:23:18 +0000 (18:23 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Thu, 28 Mar 2019 18:23:18 +0000 (18:23 +0000)
commitc91b27155288e9869fc8345c689f7f6b90b0ee7e
treef27feea1b40cd6810496a8e21ebfb9e94cd223ab
parentbb15c8b7f76f90ebcf234e4c772a0e21346ef301
PR c++/89836 - bool constant expression and explicit conversions.

* call.c (build_converted_constant_expr_internal): New function,
renamed from...
(build_converted_constant_expr): ...this.  New.
(build_converted_constant_bool_expr): New.
* cp-tree.h (build_converted_constant_bool_expr): Declare.
* decl.c (build_explicit_specifier): Call
build_converted_constant_bool_expr.

* g++.dg/cpp2a/explicit15.C: New test.

From-SVN: r270002
gcc/cp/ChangeLog
gcc/cp/call.c
gcc/cp/cp-tree.h
gcc/cp/decl.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp2a/explicit15.C [new file with mode: 0644]