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
|
@ -20,7 +20,7 @@ namespace sprout {
|
|||
template<typename T>
|
||||
inline SPROUT_CONSTEXPR auto
|
||||
first(T&& t)
|
||||
SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::tuples::get<0>(SPROUT_FORWARD(T, t))))
|
||||
SPROUT_NOEXCEPT_IF_EXPR(sprout::tuples::get<0>(SPROUT_FORWARD(T, t)))
|
||||
-> decltype(sprout::tuples::get<0>(SPROUT_FORWARD(T, t)))
|
||||
{
|
||||
return sprout::tuples::get<0>(SPROUT_FORWARD(T, t));
|
||||
|
|
|
@ -108,7 +108,7 @@ namespace sprout {
|
|||
return *this;
|
||||
}
|
||||
SPROUT_CXX14_CONSTEXPR pair& operator=(pair&& rhs)
|
||||
SPROUT_NOEXCEPT_EXPR(std::is_nothrow_move_assignable<T1>::value && std::is_nothrow_move_assignable<T2>::value)
|
||||
SPROUT_NOEXCEPT_IF(std::is_nothrow_move_assignable<T1>::value && std::is_nothrow_move_assignable<T2>::value)
|
||||
{
|
||||
first = SPROUT_FORWARD(T1, rhs.first);
|
||||
second = SPROUT_FORWARD(T2, rhs.second);
|
||||
|
@ -149,10 +149,16 @@ namespace sprout {
|
|||
std::is_assignable<first_type&, U&&>::value && std::is_assignable<second_type&, V&&>::value
|
||||
>::type
|
||||
>
|
||||
SPROUT_CXX14_CONSTEXPR pair& operator=(sprout::tuples::tuple<U, V>&& rhs);
|
||||
SPROUT_CXX14_CONSTEXPR pair&
|
||||
operator=(sprout::tuples::tuple<U, V>&& rhs);
|
||||
|
||||
SPROUT_CXX14_CONSTEXPR void swap(pair& other)
|
||||
SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::swap(first, other.first)) && SPROUT_NOEXCEPT_EXPR(sprout::swap(second, other.second))) {
|
||||
SPROUT_CXX14_CONSTEXPR void
|
||||
swap(pair& other)
|
||||
SPROUT_NOEXCEPT_IF(
|
||||
SPROUT_NOEXCEPT_EXPR(sprout::swap(first, other.first))
|
||||
&& SPROUT_NOEXCEPT_EXPR(sprout::swap(second, other.second))
|
||||
)
|
||||
{
|
||||
sprout::swap(first, other.first);
|
||||
sprout::swap(second, other.second);
|
||||
}
|
||||
|
@ -164,7 +170,7 @@ namespace sprout {
|
|||
template<typename T1, typename T2>
|
||||
inline SPROUT_CXX14_CONSTEXPR void
|
||||
swap(sprout::pair<T1, T2>& lhs, sprout::pair<T1, T2>& rhs)
|
||||
SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(lhs.swap(rhs)))
|
||||
SPROUT_NOEXCEPT_IF_EXPR(lhs.swap(rhs))
|
||||
{
|
||||
lhs.swap(rhs);
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ namespace sprout {
|
|||
template<typename T>
|
||||
inline SPROUT_CONSTEXPR auto
|
||||
second(T&& t)
|
||||
SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::tuples::get<1>(SPROUT_FORWARD(T, t))))
|
||||
SPROUT_NOEXCEPT_IF_EXPR(sprout::tuples::get<1>(SPROUT_FORWARD(T, t)))
|
||||
-> decltype(sprout::tuples::get<1>(SPROUT_FORWARD(T, t)))
|
||||
{
|
||||
return sprout::tuples::get<1>(SPROUT_FORWARD(T, t));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue