mirror of
https://github.com/bolero-MURAKAMI/Sprout
synced 2025-08-03 12:49:50 +00:00
fix macros for noexcept
This commit is contained in:
parent
23f24450b0
commit
979af136a1
125 changed files with 324 additions and 287 deletions
|
@ -28,14 +28,14 @@ namespace sprout_swap_detail {
|
|||
template<typename T, typename sprout::enabler_if<!std::is_scalar<T>::value>::type = sprout::enabler>
|
||||
inline SPROUT_CXX14_CONSTEXPR void
|
||||
swap_impl(T& a, T& b)
|
||||
SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(swap(a, b)))
|
||||
SPROUT_NOEXCEPT_IF_EXPR(swap(a, b))
|
||||
{
|
||||
swap(a, b);
|
||||
}
|
||||
template<typename T, std::size_t N>
|
||||
inline SPROUT_CXX14_CONSTEXPR void
|
||||
swap_impl(T (& a)[N], T (& b)[N])
|
||||
SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout_swap_detail::swap_impl(*a, *b)))
|
||||
SPROUT_NOEXCEPT_IF_EXPR(sprout_swap_detail::swap_impl(*a, *b))
|
||||
{
|
||||
for (std::size_t i = 0; i < N; ++i) {
|
||||
sprout_swap_detail::swap_impl(a[i], b[i]);
|
||||
|
@ -50,7 +50,7 @@ namespace sprout {
|
|||
template<typename T1, typename T2>
|
||||
inline SPROUT_CXX14_CONSTEXPR void
|
||||
swap(T1& lhs, T2& rhs)
|
||||
SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout_swap_detail::swap_impl(lhs, rhs)))
|
||||
SPROUT_NOEXCEPT_IF_EXPR(sprout_swap_detail::swap_impl(lhs, rhs))
|
||||
{
|
||||
return sprout_swap_detail::swap_impl(lhs, rhs);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue