[LLVMbugs] [Bug 18540] New: Use of specialized template function mistakenly instantiates its primary template function when the primary template function is deleted

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun Jan 19 00:33:08 PST 2014


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

            Bug ID: 18540
           Summary: Use of specialized template function mistakenly
                    instantiates its primary template function when the
                    primary template function is deleted
           Product: clang
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++11
          Assignee: unassignedclangbugs at nondot.org
          Reporter: taku50501119 at gmail.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Use of specialized template function mistakenly instantiates its primary
template function when the primary template function is deleted.

I expected the following code to compile successfully.
But, actually, it was compile error.

template <typename T>
void f(T) = delete;

template <>
void f(int) {}

int main()
{
    f(3);
}

See: http://melpon.org/wandbox/permlink/qDQB4B5HXmyDjWkj

-- 
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/20140119/aeafd16b/attachment.html>


More information about the llvm-bugs mailing list