[LLVMbugs] [Bug 19755] New: better diagnostic for explicit specialization after instantiation

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu May 15 05:04:06 PDT 2014


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

            Bug ID: 19755
           Summary: better diagnostic for explicit specialization after
                    instantiation
           Product: clang
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: mrmocool at gmx.de
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

#include <functional>
#include <map>

int main()
{
    std::map<int*, double> m;
}

namespace std
{
    template<>
    struct less < int* >
    {
        bool operator()(int* a, int* b)
        {
            return *a < *b;
        }
    };
}

$ clang++ test.cpp 
test.cpp:12:9: error: explicit specialization of 'std::less<int *>' after
instantiation
        struct less < int* >
               ^~~~~~~~~~~~~
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/bits/stl_tree.h:438:35:
note: implicit instantiation first required here
               bool _Is_pod_comparator = __is_pod(_Key_compare)>


Would be nice if it could hint at line 6 somehow.

-- 
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/20140515/7704150d/attachment.html>


More information about the llvm-bugs mailing list