[llvm-bugs] [Bug 39513] New: DR 458 not implemented?

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Nov 1 05:05:47 PDT 2018


            Bug ID: 39513
           Summary: DR 458 not implemented?
           Product: clang
           Version: 7.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: zilla at kayari.org
                CC: dgregor at apple.com, llvm-bugs at lists.llvm.org,
                    richard-llvm at metafoo.co.uk

DR 458 https://wg21.link/cwg458 modified [temp.local] to clarify that names
from the enclosing class do not hide the template parameters of a member
template. Clang does not seem to follow that rule.

This is a modified version of the example in [temp.local] p7 (removing the
parameter of g for reasons):

template<class T> struct A {
  struct B { /* ... */ };
  typedef void C;
  void f();
  template<class U> void g();

template<class B> void A<B>::f() {
  B b; // A's B, not the template parameter

template<class B> template<class C> void A<B>::g() {
  B b; // A's B, not the template parameter
  C c; // the template parameter C, not A's C

I get:

dr458.cc:14:5: error: variable has incomplete type 'A::C' (aka 'void')
  C c; // the template parameter C, not A's C
1 error generated.

clang version 7.0.0 (https://git.llvm.org/git/clang.git
1a4f56e161a5ab24aa022f7e8a754e71fa5347a1) (https://git.llvm.org/git/llvm.git

You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20181101/54a6aefe/attachment.html>

More information about the llvm-bugs mailing list