https://bugs.llvm.org/show_bug.cgi?id=46214

            Bug ID: 46214
           Summary: Clang can not compile typename with non-type in using
                    declaration
           Product: clang
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected], [email protected],
                    [email protected]

cat test.cc

namespace g_namespace {
    int var = 9;
    typedef int C; 
}
int main() {
  using typename g_namespace::var; //fails
  using typename g_namespace::C; //ok
  return 0;
}

$clang++-trunk test.cc
<source>:6:31: error: 'typename' keyword used on a non-type
  using typename g_namespace::var; //fails
                              ^
<source>:2:9: note: target of using declaration
    int var = 9;
        ^
1 error generated.
Execution build compiler returned: 1

Reproduced in godbolt: https://godbolt.org/z/MgR7GF

In GCC, test.cc is compiled well.

I am wondering that is it Clang still not support this feature that
using-declaration with a non-type typename or this is a bug in clang?

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to