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: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs