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

            Bug ID: 17521
           Summary: function template arguments deduction problem
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]
    Classification: Unclassified

Created attachment 11351
  --> http://llvm.org/bugs/attachment.cgi?id=11351&action=edit
problem. clang++ & g++ comparison

clang++ 3.3 & 3.4.

Argument deduction should fail for function template
template<class T> void tf(const T*) when pointer to function is passing as arg.

Example:

#include <iostream>

template<class T> void tf(const T*) {  // 1. clang++ 
    std::cout << "void tf(const T*)\n"; 
}

template<class T> void tf(T) {  // 2. g++ 4.8.1
    std::cout << "void tf(T)\n"; 
}

int main(){ 
    tf(std::hex);
}

It seems to me that according to C++ 03 compiler have to select second version
of tf. Cause pointer to a function can't be cv - qualified.

-- 
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