This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

C++ PATCH for c++/42329, P0522 and other template template parm issues


The first patch fixes some issues that I noticed in implementing P0522
with my earlier auto non-type parameters work.

The second patch uses deduction to confirm that a partial
specialization is more specialized than the primary template, which
catches some bugs in the testsuite that the existing checks didn't.

The third patch fixes an issue that came up in the context of P0522
with explicit arguments and variadic templates: we were incorrectly
rejecting a template template-argument because of the trailing
expansion of pack elements yet to be deduced.  This is incorrect
because they can be deduced to an empty set, making the binding
well-formed.  This fix required a change to the libstdc++ testsuite,
as the test_property overloads become ambiguous.

The fourth patch fixes 42329, where we were failing to bind a template
template-parameter to a base class of the argument type.

The last patch implements paper P0522, which resolves DR150 to clarify
that default arguments do make a template suitable as an argument to a
template template-parameter based on a new rule that the
template-parameter must be more specialized (as newly defined) than
the argument template.  This is a defect report that will apply to all
standard levels, but since we're in stage3 I limited it by default to
C++17 for GCC 7; it can also be explicitly enabled with
-fnew-ttp-matching.

Tested x86_64-pc-linux-gnu, applying to trunk.

Attachment: nontype-auto2.diff
Description: Text document

Attachment: partial-more.diff
Description: Text document

Attachment: explicit-ttp.diff
Description: Text document

Attachment: 42329.diff
Description: Text document

Attachment: dr150.diff
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]