diff options
author | Jason Merrill <jason@redhat.com> | 2020-07-02 15:14:52 -0400 |
---|---|---|
committer | Jason Merrill <jason@redhat.com> | 2020-07-10 08:36:50 -0400 |
commit | 50f071d999374b6dd13149a31f505d4457c9de6d (patch) | |
tree | 1885dd7dce23a0a290a08ea85c2e9f593c83d513 /gcc/cp/mangle.c | |
parent | e47dfca5aa473e77fdff95d631dc39de87a41eec (diff) | |
download | gcc-50f071d999374b6dd13149a31f505d4457c9de6d.zip gcc-50f071d999374b6dd13149a31f505d4457c9de6d.tar.gz gcc-50f071d999374b6dd13149a31f505d4457c9de6d.tar.bz2 |
c++: Allow floating-point template parms in C++20.
P1907R1 made various adjustments to non-type template parameters, notably
introducing the notion of "structural type". I implemented an early version
of that specification in r10-4426, but it was adjusted in the final paper to
allow more. This patch implements allowing template parameters of
floating-point type; still to be implemented are unions and subobjects.
gcc/cp/ChangeLog:
* pt.c (convert_nontype_argument): Handle REAL_TYPE.
(invalid_nontype_parm_type_p): Allow all structural types.
* tree.c (structural_type_p): Use SCALAR_TYPE_P.
gcc/testsuite/ChangeLog:
* g++.dg/cpp0x/pr81246.C: No error in C++20.
* g++.dg/cpp0x/variadic74.C: No error in C++20.
* g++.dg/cpp1z/nontype-auto3.C: No error in C++20.
* g++.dg/template/crash106.C: No error in C++20.
* g++.dg/template/crash119.C: No error in C++20.
* g++.dg/template/nontype12.C: No error in C++20.
* g++.dg/template/void3.C: Don't require follow-on message.
* g++.dg/template/void7.C: Don't require follow-on message.
* g++.dg/template/void9.C: Don't require follow-on message.
Diffstat (limited to 'gcc/cp/mangle.c')
0 files changed, 0 insertions, 0 deletions