[LLVMbugs] [Bug 19551] New: explicit instantiation confused for a function with a deduced return type if it's already been instantiated

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Apr 24 15:07:01 PDT 2014


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: unassignedclangbugs at nondot.org
          Reporter: richard-llvm at metafoo.co.uk
                CC: llvmbugs at cs.uiuc.edu
    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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140424/8c055d1e/attachment.html>


More information about the llvm-bugs mailing list