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: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]
    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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to