[libcxx] r230484 - Add trailing return types (and noexcept specifications) to the 'diamond operators'. Fixes PR#22600.
Marshall Clow
mclow.lists at gmail.com
Wed Feb 25 04:20:53 PST 2015
Author: marshall
Date: Wed Feb 25 06:20:52 2015
New Revision: 230484
URL: http://llvm.org/viewvc/llvm-project?rev=230484&view=rev
Log:
Add trailing return types (and noexcept specifications) to the 'diamond operators'. Fixes PR#22600.
Modified:
libcxx/trunk/include/__functional_base
libcxx/trunk/include/functional
Modified: libcxx/trunk/include/__functional_base
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/__functional_base?rev=230484&r1=230483&r2=230484&view=diff
==============================================================================
--- libcxx/trunk/include/__functional_base (original)
+++ libcxx/trunk/include/__functional_base Wed Feb 25 06:20:52 2015
@@ -70,7 +70,9 @@ struct _LIBCPP_TYPE_VIS_ONLY less<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); }
+ _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); }
typedef void is_transparent;
};
#endif
Modified: libcxx/trunk/include/functional
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/functional?rev=230484&r1=230483&r2=230484&view=diff
==============================================================================
--- libcxx/trunk/include/functional (original)
+++ libcxx/trunk/include/functional Wed Feb 25 06:20:52 2015
@@ -504,7 +504,9 @@ 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); }
+ _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); }
typedef void is_transparent;
};
#endif
@@ -529,7 +531,9 @@ struct _LIBCPP_TYPE_VIS_ONLY minus<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); }
+ _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); }
typedef void is_transparent;
};
#endif
@@ -554,7 +558,9 @@ struct _LIBCPP_TYPE_VIS_ONLY multiplies<
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); }
+ _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); }
typedef void is_transparent;
};
#endif
@@ -579,7 +585,9 @@ struct _LIBCPP_TYPE_VIS_ONLY divides<voi
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); }
+ _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); }
typedef void is_transparent;
};
#endif
@@ -604,7 +612,9 @@ struct _LIBCPP_TYPE_VIS_ONLY modulus<voi
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); }
+ _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); }
typedef void is_transparent;
};
#endif
@@ -629,7 +639,9 @@ struct _LIBCPP_TYPE_VIS_ONLY negate<void
template <class _Tp>
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
auto operator()(_Tp&& __x) const
- { return -_VSTD::forward<_Tp>(__x); }
+ _NOEXCEPT_(noexcept(- _VSTD::forward<_Tp>(__x)))
+ -> decltype (- _VSTD::forward<_Tp>(__x))
+ { return - _VSTD::forward<_Tp>(__x); }
typedef void is_transparent;
};
#endif
@@ -654,7 +666,9 @@ struct _LIBCPP_TYPE_VIS_ONLY equal_to<vo
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); }
+ _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); }
typedef void is_transparent;
};
#endif
@@ -679,7 +693,9 @@ struct _LIBCPP_TYPE_VIS_ONLY not_equal_t
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); }
+ _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); }
typedef void is_transparent;
};
#endif
@@ -704,7 +720,9 @@ struct _LIBCPP_TYPE_VIS_ONLY greater<voi
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); }
+ _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); }
typedef void is_transparent;
};
#endif
@@ -731,7 +749,9 @@ struct _LIBCPP_TYPE_VIS_ONLY greater_equ
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); }
+ _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); }
typedef void is_transparent;
};
#endif
@@ -756,7 +776,9 @@ struct _LIBCPP_TYPE_VIS_ONLY less_equal<
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); }
+ _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); }
typedef void is_transparent;
};
#endif
@@ -781,7 +803,9 @@ struct _LIBCPP_TYPE_VIS_ONLY logical_and
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); }
+ _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); }
typedef void is_transparent;
};
#endif
@@ -806,7 +830,9 @@ struct _LIBCPP_TYPE_VIS_ONLY logical_or<
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); }
+ _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); }
typedef void is_transparent;
};
#endif
@@ -831,7 +857,9 @@ struct _LIBCPP_TYPE_VIS_ONLY logical_not
template <class _Tp>
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
auto operator()(_Tp&& __x) const
- { return !_VSTD::forward<_Tp>(__x); }
+ _NOEXCEPT_(noexcept(!_VSTD::forward<_Tp>(__x)))
+ -> decltype (!_VSTD::forward<_Tp>(__x))
+ { return !_VSTD::forward<_Tp>(__x); }
typedef void is_transparent;
};
#endif
@@ -856,7 +884,9 @@ struct _LIBCPP_TYPE_VIS_ONLY bit_and<voi
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); }
+ _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); }
typedef void is_transparent;
};
#endif
@@ -881,7 +911,9 @@ struct _LIBCPP_TYPE_VIS_ONLY bit_or<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); }
+ _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); }
typedef void is_transparent;
};
#endif
@@ -906,7 +938,9 @@ struct _LIBCPP_TYPE_VIS_ONLY bit_xor<voi
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); }
+ _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); }
typedef void is_transparent;
};
#endif
@@ -927,7 +961,9 @@ struct _LIBCPP_TYPE_VIS_ONLY bit_not<voi
template <class _Tp>
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
auto operator()(_Tp&& __x) const
- { return ~_VSTD::forward<_Tp>(__x); }
+ _NOEXCEPT_(noexcept(~_VSTD::forward<_Tp>(__x)))
+ -> decltype (~_VSTD::forward<_Tp>(__x))
+ { return ~_VSTD::forward<_Tp>(__x); }
typedef void is_transparent;
};
#endif
More information about the cfe-commits
mailing list