HomePhabricator

[c++17] Implement P0522R0 as written. This allows a template template argument

Description

[c++17] Implement P0522R0 as written. This allows a template template argument
to be specified for a template template parameter whenever the parameter is at
least as specialized as the argument (when there's an obvious and correct
mapping from uses of the parameter to uses of the argument). For example, a
template with more parameters can be passed to a template template parameter
with fewer, if those trailing parameters have default arguments.

This is disabled by default, despite being a DR resolution, as it's fairly
broken in its current state: there are no partial ordering rules to cope with
template template parameters that have different parameter lists, meaning that
code that attempts to decompose template-ids based on arity can hit unavoidable
ambiguity issues.

The diagnostics produced on a non-matching argument are also pretty bad right
now, but I aim to improve them in a subsequent commit.

Details

Committed
rsmithDec 31 2016, 1:41 PM
Parents
rL290791: system_error: use strerror_r only for threaded code
Branches
Unknown
Tags
Unknown

Event Timeline

Matt added a subscriber: Matt.Jan 2 2017, 11:33 AM
Matt added inline comments.
/cfe/trunk/include/clang/Basic/LangOptions.def
137

A small typo: is tempalte, should be template.