http://llvm.org/bugs/show_bug.cgi?id=19551

            Bug ID: 19551
           Summary: explicit instantiation confused for a function with a
                    deduced return type if it's already been instantiated
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++1y
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

template<typename T> auto f(T) { return 0; }
int k = f(0); // #1
template auto f(int); // #2
template int f(int); // #3

Without line #1, we accept #2 and reject #3.
With line #1, we reject #2 and accept #3.

Line #2 is valid here, and line #3 is invalid, but apparently the implicit
instantiation confuses us and makes us forget that the return type was written
as 'auto'.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to