PR c++/87145 - bogus error converting class type in template arg list.
authorMarek Polacek <polacek@redhat.com>
Fri, 5 Apr 2019 21:22:40 +0000 (21:22 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Fri, 5 Apr 2019 21:22:40 +0000 (21:22 +0000)
commitadc06f45fbef12b06cdbb5603a372d82dca1baec
tree0215c743d4c6ee48f4fea2ddf91b7cde0e067dab
parent6464d9b18207d381568b0a5b5a953286ccd2a5b6
PR c++/87145 - bogus error converting class type in template arg list.

* pt.c (convert_nontype_argument): Don't call
build_converted_constant_expr if it could involve calling a conversion
function with a instantiation-dependent constructor as its argument.

* g++.dg/cpp0x/constexpr-conv3.C: New test.
* g++.dg/cpp0x/constexpr-conv4.C: New test.

From-SVN: r270178
gcc/cp/ChangeLog
gcc/cp/pt.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/constexpr-conv3.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/constexpr-conv4.C [new file with mode: 0644]