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: unassignedclangb...@nondot.org
          Reporter: rs2...@gmail.com
                CC: llvm-bugs@lists.llvm.org, mclow.li...@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to