[llvm-bugs] [Bug 32606] New: std::decay mishandles abominable function types

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Apr 10 12:49:22 PDT 2017


            Bug ID: 32606
           Summary: std::decay mishandles abominable function types
           Product: libc++
           Version: 4.0
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          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 causes a hard error when given an abominable
function type like 'int () const' because the non-taken branch of the
std::conditional ('typename remove_extent<_Up>::type*') attempts to form a
pointer to it:

template <class _Tp>
    typedef typename remove_reference<_Tp>::type _Up;
    typedef typename conditional
                         typename remove_extent<_Up>::type*,
                         typename conditional
                              typename add_pointer<_Up>::type,
                              typename remove_cv<_Up>::type
                     >::type type;

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/fe3e1b0a/attachment.html>

More information about the llvm-bugs mailing list