Skip to content

CTAD through a template template parameter of an alias template [GH #173] - #329

Open
nv-cmeerw wants to merge 1 commit into
mainfrom
fix/173
Open

nv-cmeerw wants to merge 1 commit into
mainfrom
fix/173

Conversation

@nv-cmeerw

Copy link
Copy Markdown
Contributor

With the changes for EDGcpfe/28857 (in version 6.9), a decltype in an alias
template that deduces class template arguments through one of the alias
template's template template parameters could trigger an internal error due to
a failed assertion in generic_cast_operand, when the alias was used with
dependent arguments, for example in a requires expression. For example, with
--c++20:

  template<typename T> struct S { S(T); };
  template<template<typename> class TT> using A = decltype(TT(0));
  template<template<typename> class TT>
  constexpr bool b = requires { typename A<TT>; };
  static_assert(b<S>);  // Previously an internal error, now okay.

In addition, deduction now succeeds when the template bound to the template
template parameter has more parameters (with default arguments or packs) than
the parameter itself, and a mismatch is now treated as a deduction failure
rather than an error in contexts where errors are not issued.

@nv-cmeerw

Copy link
Copy Markdown
Contributor Author

@stevensudit-corvid FYI

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant