[llvm-bugs] [Bug 42718] New: clang=8.0 behaves different from clang=6.0 it should template as stated by standard - "As is the case with typename, the template prefix is allowed even if the name is not dependent"
    via llvm-bugs 
    llvm-bugs at lists.llvm.org
       
    Mon Jul 22 17:04:58 PDT 2019
    
    
  
https://bugs.llvm.org/show_bug.cgi?id=42718
            Bug ID: 42718
           Summary: clang=8.0 behaves different from clang=6.0 it should
                    template as stated by standard - "As is the case with
                    typename, the template prefix is allowed even if the
                    name is not dependent"
           Product: clang
           Version: unspecified
          Hardware: Macintosh
                OS: MacOS X
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++17
          Assignee: unassignedclangbugs at nondot.org
          Reporter: vladimir.venediktov at forkbid.com
                CC: blitzrakete at gmail.com, erik.pilkington at gmail.com,
                    llvm-bugs at lists.llvm.org, richard-llvm at metafoo.co.uk
The code example compiles with all compilers except clang=8 
https://godbolt.org/z/VpwYDF
#include <utility>
struct A  {
    template<typename T> void func( T && t ) {}
};
struct B  {
    void func( int  ) {}
};
struct C {
    template<typename T, typename U> void func(T && t, U && u) {
         //"As is the case with typename, the template prefix is allowed even
if the name is not dependent"
        t.template func(std::forward<U>(u));
    }
};
int main () {
    C c ;
    c.func(A(), 1);
    c.func(B(), 1);
}
-- 
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/20190723/5b1d0637/attachment.html>
    
    
More information about the llvm-bugs
mailing list