https://bugs.llvm.org/show_bug.cgi?id=39068
Bug ID: 39068
Summary: Strange overload resolution with decltype in template
function
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: C++
Assignee: unassignedclangb...@nondot.org
Reporter: zamazan...@tut.by
CC: dgre...@apple.com, llvm-bugs@lists.llvm.org
clang(trunk) for this code:
#include <iostream>
template <typename T> int foo(int) { return 1; }
template <typename T> int foo(decltype(T{})) { return 2; }
template <typename T> int foo(decltype(int(T{}))) { return 3;}
int main()
{
std::cout << foo<int>(0);
}
prints '1'. But as I understand here should be compilation error because of
ambiguous call to overload function
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs