[llvm-bugs] [Bug 32605] New: common_type<T> is not SFINAE-friendly
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Apr 10 12:45:24 PDT 2017
http://bugs.llvm.org/show_bug.cgi?id=32605
Bug ID: 32605
Summary: common_type<T> is not SFINAE-friendly
Product: libc++
Version: unspecified
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: All Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: rs2740 at gmail.com
CC: llvm-bugs at lists.llvm.org, mclow.lists at gmail.com
The current implementation
template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS common_type<_Tp>
{
typedef typename common_type<_Tp, _Tp>::type type;
};
is incorrect, because common_type<_Tp, _Tp>::type need not exist, in which case
the current implementation will cause a hard error. This is the case for
abominable function types (although they currently fail due to a separate bug
in std::decay), and user-defined specializations may also fail to supply a
::type member. P0548 requires this case to be SFINAE-friendly.
--
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/20170410/2cb2e9ca/attachment.html>
More information about the llvm-bugs
mailing list