rsmith added a comment.

In D86048#2254607 <https://reviews.llvm.org/D86048#2254607>, @sammccall wrote:

> The crux is we're forcing `decltype(N)` to be a (unique) dependent type, 
> which feels wrong.
> [...]
> There are three behaviors:
>
> - standard up to C++14: traversing the expr looking for a template param to 
> be lexically included (this is my reading of the standard)

FWIW, "involves a template parameter" is exactly the same phrasing that 
[temp.over.link] uses to refer to instantiation-dependence; that's why Clang 
uses instantiation-dependence in this case at the moment.

> - what clang actually does: check instantiation dependence, which I think 
> pulls in too many cases
> - standard after http://wg21.link/cwg2064: check type dependence
>
> I think it's probably OK to adopt the C++17 behavior for all versions (if I'm 
> right that the current behavior is a bug).
> @rsmith It's your DR, what do you think :-)

Let's try it and see what happens. I think this will reveal a collection of 
cases where we don't properly handle 
instantiation-dependent-but-not-type-dependent constructs (such as, if I 
remember correctly, the types of non-type template parameters), but we should 
be fixing those bugs anyway :)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D86048/new/

https://reviews.llvm.org/D86048

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to