[LLVMbugs] [Bug 22600] New: Wrong return type for operator() of "diamond functors"

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun Feb 15 20:10:42 PST 2015


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

            Bug ID: 22600
           Summary: Wrong return type for operator() of "diamond functors"
           Product: libc++
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: rs2740 at gmail.com
                CC: llvmbugs at cs.uiuc.edu, mclow.lists at gmail.com
    Classification: Unclassified

Currently, all of the transparent operator functors in <functional> returns
auto. For example:

template <>
struct _LIBCPP_TYPE_VIS_ONLY plus<void>
{
    template <class _T1, class _T2>
    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
    auto operator()(_T1&& __t, _T2&& __u) const
        { return _VSTD::forward<_T1>(__t) + _VSTD::forward<_T2>(__u); }
    typedef void is_transparent;
};


The standard depicts them as having a trailing return type of decltype(/* the
returned expression */), which is equivalent to returning decltype(auto) except
for SFINAE considerations.

-- 
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/20150216/795329d0/attachment.html>


More information about the llvm-bugs mailing list