Add trailing return types (and noexcept specifications) to the 'diamond operators'. Fixes PR#22600.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@230484 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Marshall Clow 2015-02-25 12:20:52 +00:00
parent fec08372b8
commit 59ac38ccd1
2 changed files with 57 additions and 19 deletions

View File

@ -70,6 +70,8 @@ struct _LIBCPP_TYPE_VIS_ONLY less<void>
template <class _T1, class _T2> template <class _T1, class _T2>
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
auto operator()(_T1&& __t, _T2&& __u) const auto operator()(_T1&& __t, _T2&& __u) const
_NOEXCEPT_(noexcept(_VSTD::forward<_T1>(__t) < _VSTD::forward<_T2>(__u)))
-> decltype (_VSTD::forward<_T1>(__t) < _VSTD::forward<_T2>(__u))
{ return _VSTD::forward<_T1>(__t) < _VSTD::forward<_T2>(__u); } { return _VSTD::forward<_T1>(__t) < _VSTD::forward<_T2>(__u); }
typedef void is_transparent; typedef void is_transparent;
}; };

View File

@ -504,6 +504,8 @@ struct _LIBCPP_TYPE_VIS_ONLY plus<void>
template <class _T1, class _T2> template <class _T1, class _T2>
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
auto operator()(_T1&& __t, _T2&& __u) const auto operator()(_T1&& __t, _T2&& __u) const
_NOEXCEPT_(noexcept(_VSTD::forward<_T1>(__t) + _VSTD::forward<_T2>(__u)))
-> decltype (_VSTD::forward<_T1>(__t) + _VSTD::forward<_T2>(__u))
{ return _VSTD::forward<_T1>(__t) + _VSTD::forward<_T2>(__u); } { return _VSTD::forward<_T1>(__t) + _VSTD::forward<_T2>(__u); }
typedef void is_transparent; typedef void is_transparent;
}; };
@ -529,6 +531,8 @@ struct _LIBCPP_TYPE_VIS_ONLY minus<void>
template <class _T1, class _T2> template <class _T1, class _T2>
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
auto operator()(_T1&& __t, _T2&& __u) const auto operator()(_T1&& __t, _T2&& __u) const
_NOEXCEPT_(noexcept(_VSTD::forward<_T1>(__t) - _VSTD::forward<_T2>(__u)))
-> decltype (_VSTD::forward<_T1>(__t) - _VSTD::forward<_T2>(__u))
{ return _VSTD::forward<_T1>(__t) - _VSTD::forward<_T2>(__u); } { return _VSTD::forward<_T1>(__t) - _VSTD::forward<_T2>(__u); }
typedef void is_transparent; typedef void is_transparent;
}; };
@ -554,6 +558,8 @@ struct _LIBCPP_TYPE_VIS_ONLY multiplies<void>
template <class _T1, class _T2> template <class _T1, class _T2>
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
auto operator()(_T1&& __t, _T2&& __u) const auto operator()(_T1&& __t, _T2&& __u) const
_NOEXCEPT_(noexcept(_VSTD::forward<_T1>(__t) * _VSTD::forward<_T2>(__u)))
-> decltype (_VSTD::forward<_T1>(__t) * _VSTD::forward<_T2>(__u))
{ return _VSTD::forward<_T1>(__t) * _VSTD::forward<_T2>(__u); } { return _VSTD::forward<_T1>(__t) * _VSTD::forward<_T2>(__u); }
typedef void is_transparent; typedef void is_transparent;
}; };
@ -579,6 +585,8 @@ struct _LIBCPP_TYPE_VIS_ONLY divides<void>
template <class _T1, class _T2> template <class _T1, class _T2>
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
auto operator()(_T1&& __t, _T2&& __u) const auto operator()(_T1&& __t, _T2&& __u) const
_NOEXCEPT_(noexcept(_VSTD::forward<_T1>(__t) / _VSTD::forward<_T2>(__u)))
-> decltype (_VSTD::forward<_T1>(__t) / _VSTD::forward<_T2>(__u))
{ return _VSTD::forward<_T1>(__t) / _VSTD::forward<_T2>(__u); } { return _VSTD::forward<_T1>(__t) / _VSTD::forward<_T2>(__u); }
typedef void is_transparent; typedef void is_transparent;
}; };
@ -604,6 +612,8 @@ struct _LIBCPP_TYPE_VIS_ONLY modulus<void>
template <class _T1, class _T2> template <class _T1, class _T2>
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
auto operator()(_T1&& __t, _T2&& __u) const auto operator()(_T1&& __t, _T2&& __u) const
_NOEXCEPT_(noexcept(_VSTD::forward<_T1>(__t) % _VSTD::forward<_T2>(__u)))
-> decltype (_VSTD::forward<_T1>(__t) % _VSTD::forward<_T2>(__u))
{ return _VSTD::forward<_T1>(__t) % _VSTD::forward<_T2>(__u); } { return _VSTD::forward<_T1>(__t) % _VSTD::forward<_T2>(__u); }
typedef void is_transparent; typedef void is_transparent;
}; };
@ -629,6 +639,8 @@ struct _LIBCPP_TYPE_VIS_ONLY negate<void>
template <class _Tp> template <class _Tp>
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
auto operator()(_Tp&& __x) const auto operator()(_Tp&& __x) const
_NOEXCEPT_(noexcept(- _VSTD::forward<_Tp>(__x)))
-> decltype (- _VSTD::forward<_Tp>(__x))
{ return - _VSTD::forward<_Tp>(__x); } { return - _VSTD::forward<_Tp>(__x); }
typedef void is_transparent; typedef void is_transparent;
}; };
@ -654,6 +666,8 @@ struct _LIBCPP_TYPE_VIS_ONLY equal_to<void>
template <class _T1, class _T2> template <class _T1, class _T2>
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
auto operator()(_T1&& __t, _T2&& __u) const auto operator()(_T1&& __t, _T2&& __u) const
_NOEXCEPT_(noexcept(_VSTD::forward<_T1>(__t) == _VSTD::forward<_T2>(__u)))
-> decltype (_VSTD::forward<_T1>(__t) == _VSTD::forward<_T2>(__u))
{ return _VSTD::forward<_T1>(__t) == _VSTD::forward<_T2>(__u); } { return _VSTD::forward<_T1>(__t) == _VSTD::forward<_T2>(__u); }
typedef void is_transparent; typedef void is_transparent;
}; };
@ -679,6 +693,8 @@ struct _LIBCPP_TYPE_VIS_ONLY not_equal_to<void>
template <class _T1, class _T2> template <class _T1, class _T2>
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
auto operator()(_T1&& __t, _T2&& __u) const auto operator()(_T1&& __t, _T2&& __u) const
_NOEXCEPT_(noexcept(_VSTD::forward<_T1>(__t) != _VSTD::forward<_T2>(__u)))
-> decltype (_VSTD::forward<_T1>(__t) != _VSTD::forward<_T2>(__u))
{ return _VSTD::forward<_T1>(__t) != _VSTD::forward<_T2>(__u); } { return _VSTD::forward<_T1>(__t) != _VSTD::forward<_T2>(__u); }
typedef void is_transparent; typedef void is_transparent;
}; };
@ -704,6 +720,8 @@ struct _LIBCPP_TYPE_VIS_ONLY greater<void>
template <class _T1, class _T2> template <class _T1, class _T2>
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
auto operator()(_T1&& __t, _T2&& __u) const auto operator()(_T1&& __t, _T2&& __u) const
_NOEXCEPT_(noexcept(_VSTD::forward<_T1>(__t) > _VSTD::forward<_T2>(__u)))
-> decltype (_VSTD::forward<_T1>(__t) > _VSTD::forward<_T2>(__u))
{ return _VSTD::forward<_T1>(__t) > _VSTD::forward<_T2>(__u); } { return _VSTD::forward<_T1>(__t) > _VSTD::forward<_T2>(__u); }
typedef void is_transparent; typedef void is_transparent;
}; };
@ -731,6 +749,8 @@ struct _LIBCPP_TYPE_VIS_ONLY greater_equal<void>
template <class _T1, class _T2> template <class _T1, class _T2>
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
auto operator()(_T1&& __t, _T2&& __u) const auto operator()(_T1&& __t, _T2&& __u) const
_NOEXCEPT_(noexcept(_VSTD::forward<_T1>(__t) >= _VSTD::forward<_T2>(__u)))
-> decltype (_VSTD::forward<_T1>(__t) >= _VSTD::forward<_T2>(__u))
{ return _VSTD::forward<_T1>(__t) >= _VSTD::forward<_T2>(__u); } { return _VSTD::forward<_T1>(__t) >= _VSTD::forward<_T2>(__u); }
typedef void is_transparent; typedef void is_transparent;
}; };
@ -756,6 +776,8 @@ struct _LIBCPP_TYPE_VIS_ONLY less_equal<void>
template <class _T1, class _T2> template <class _T1, class _T2>
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
auto operator()(_T1&& __t, _T2&& __u) const auto operator()(_T1&& __t, _T2&& __u) const
_NOEXCEPT_(noexcept(_VSTD::forward<_T1>(__t) <= _VSTD::forward<_T2>(__u)))
-> decltype (_VSTD::forward<_T1>(__t) <= _VSTD::forward<_T2>(__u))
{ return _VSTD::forward<_T1>(__t) <= _VSTD::forward<_T2>(__u); } { return _VSTD::forward<_T1>(__t) <= _VSTD::forward<_T2>(__u); }
typedef void is_transparent; typedef void is_transparent;
}; };
@ -781,6 +803,8 @@ struct _LIBCPP_TYPE_VIS_ONLY logical_and<void>
template <class _T1, class _T2> template <class _T1, class _T2>
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
auto operator()(_T1&& __t, _T2&& __u) const auto operator()(_T1&& __t, _T2&& __u) const
_NOEXCEPT_(noexcept(_VSTD::forward<_T1>(__t) && _VSTD::forward<_T2>(__u)))
-> decltype (_VSTD::forward<_T1>(__t) && _VSTD::forward<_T2>(__u))
{ return _VSTD::forward<_T1>(__t) && _VSTD::forward<_T2>(__u); } { return _VSTD::forward<_T1>(__t) && _VSTD::forward<_T2>(__u); }
typedef void is_transparent; typedef void is_transparent;
}; };
@ -806,6 +830,8 @@ struct _LIBCPP_TYPE_VIS_ONLY logical_or<void>
template <class _T1, class _T2> template <class _T1, class _T2>
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
auto operator()(_T1&& __t, _T2&& __u) const auto operator()(_T1&& __t, _T2&& __u) const
_NOEXCEPT_(noexcept(_VSTD::forward<_T1>(__t) || _VSTD::forward<_T2>(__u)))
-> decltype (_VSTD::forward<_T1>(__t) || _VSTD::forward<_T2>(__u))
{ return _VSTD::forward<_T1>(__t) || _VSTD::forward<_T2>(__u); } { return _VSTD::forward<_T1>(__t) || _VSTD::forward<_T2>(__u); }
typedef void is_transparent; typedef void is_transparent;
}; };
@ -831,6 +857,8 @@ struct _LIBCPP_TYPE_VIS_ONLY logical_not<void>
template <class _Tp> template <class _Tp>
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
auto operator()(_Tp&& __x) const auto operator()(_Tp&& __x) const
_NOEXCEPT_(noexcept(!_VSTD::forward<_Tp>(__x)))
-> decltype (!_VSTD::forward<_Tp>(__x))
{ return !_VSTD::forward<_Tp>(__x); } { return !_VSTD::forward<_Tp>(__x); }
typedef void is_transparent; typedef void is_transparent;
}; };
@ -856,6 +884,8 @@ struct _LIBCPP_TYPE_VIS_ONLY bit_and<void>
template <class _T1, class _T2> template <class _T1, class _T2>
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
auto operator()(_T1&& __t, _T2&& __u) const auto operator()(_T1&& __t, _T2&& __u) const
_NOEXCEPT_(noexcept(_VSTD::forward<_T1>(__t) & _VSTD::forward<_T2>(__u)))
-> decltype (_VSTD::forward<_T1>(__t) & _VSTD::forward<_T2>(__u))
{ return _VSTD::forward<_T1>(__t) & _VSTD::forward<_T2>(__u); } { return _VSTD::forward<_T1>(__t) & _VSTD::forward<_T2>(__u); }
typedef void is_transparent; typedef void is_transparent;
}; };
@ -881,6 +911,8 @@ struct _LIBCPP_TYPE_VIS_ONLY bit_or<void>
template <class _T1, class _T2> template <class _T1, class _T2>
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
auto operator()(_T1&& __t, _T2&& __u) const auto operator()(_T1&& __t, _T2&& __u) const
_NOEXCEPT_(noexcept(_VSTD::forward<_T1>(__t) | _VSTD::forward<_T2>(__u)))
-> decltype (_VSTD::forward<_T1>(__t) | _VSTD::forward<_T2>(__u))
{ return _VSTD::forward<_T1>(__t) | _VSTD::forward<_T2>(__u); } { return _VSTD::forward<_T1>(__t) | _VSTD::forward<_T2>(__u); }
typedef void is_transparent; typedef void is_transparent;
}; };
@ -906,6 +938,8 @@ struct _LIBCPP_TYPE_VIS_ONLY bit_xor<void>
template <class _T1, class _T2> template <class _T1, class _T2>
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
auto operator()(_T1&& __t, _T2&& __u) const auto operator()(_T1&& __t, _T2&& __u) const
_NOEXCEPT_(noexcept(_VSTD::forward<_T1>(__t) ^ _VSTD::forward<_T2>(__u)))
-> decltype (_VSTD::forward<_T1>(__t) ^ _VSTD::forward<_T2>(__u))
{ return _VSTD::forward<_T1>(__t) ^ _VSTD::forward<_T2>(__u); } { return _VSTD::forward<_T1>(__t) ^ _VSTD::forward<_T2>(__u); }
typedef void is_transparent; typedef void is_transparent;
}; };
@ -927,6 +961,8 @@ struct _LIBCPP_TYPE_VIS_ONLY bit_not<void>
template <class _Tp> template <class _Tp>
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
auto operator()(_Tp&& __x) const auto operator()(_Tp&& __x) const
_NOEXCEPT_(noexcept(~_VSTD::forward<_Tp>(__x)))
-> decltype (~_VSTD::forward<_Tp>(__x))
{ return ~_VSTD::forward<_Tp>(__x); } { return ~_VSTD::forward<_Tp>(__x); }
typedef void is_transparent; typedef void is_transparent;
}; };