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

            Bug ID: 47587
           Summary: Unexpected name lookup success in specialization of
                    tempalte class with variadic number of base classes
           Product: clang
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++17
          Assignee: unassignedclangb...@nondot.org
          Reporter: anders.granlun...@gmail.com
                CC: blitzrak...@gmail.com, erik.pilking...@gmail.com,
                    llvm-bugs@lists.llvm.org, richard-l...@metafoo.co.uk

Consider the following c++ program:

  #include <iostream>

  class A
  {
    protected:
      static constexpr int x = 123;
  };

  template<typename T>
  using B = A;

  template<typename ...T>
  class C : B<T> ...
  {
    public:
      static int f()
      {
        return x;
      }
  };

  int main()
  {
    std::cout << C<>::f() << std::endl;
  }

The name-lookup of x the method f should fail for the specialization C<> of the
template class C, but it does not when compiling with "-std=c++17
-pedantic-errors" (no compilation errros are outputed).

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

Reply via email to