1
0
Fork 0
mirror of https://github.com/bolero-MURAKAMI/Sprout synced 2025-08-03 12:49:50 +00:00

fix coding-stype

This commit is contained in:
bolero-MURAKAMI 2012-10-06 00:58:56 +09:00
parent 2012838899
commit df3023db30
196 changed files with 2510 additions and 3945 deletions

View file

@ -201,7 +201,7 @@ namespace sprout_tuple_detail {
>
inline SPROUT_CONSTEXPR typename sprout_tuple_detail::get_result<I, T>::type
get_impl(T&& t)
SPROUT_NOEXCEPT_EXPR((sprout_tuple_detail::noexcept_get<I, T>::value))
SPROUT_NOEXCEPT_EXPR((sprout_tuple_detail::noexcept_get<I, T>::value))
{
return tuple_get<I>(sprout::forward<T>(t));
}
@ -211,7 +211,7 @@ namespace sprout_tuple_detail {
>
inline SPROUT_CONSTEXPR typename sprout_tuple_detail::get_result<I, T>::type
get_impl(T&& t)
SPROUT_NOEXCEPT_EXPR((sprout_tuple_detail::noexcept_get<I, T>::value))
SPROUT_NOEXCEPT_EXPR((sprout_tuple_detail::noexcept_get<I, T>::value))
{
return std::get<I>(sprout::forward<T>(t));
}

View file

@ -6,7 +6,9 @@
#include <type_traits>
#include <tuple>
#include <sprout/config.hpp>
#include <sprout/utility/operation.hpp>
#include <sprout/utility/forward.hpp>
#include <sprout/utility/move.hpp>
#include <sprout/utility/swap.hpp>
#include <sprout/tuple/tuple/tuple_fwd.hpp>
#include <sprout/tuple/tuple/type_traits.hpp>
@ -141,13 +143,13 @@ namespace sprout {
return t;
}
protected:
void swap(tuple_impl& t) SPROUT_NOEXCEPT_EXPR(
SPROUT_NOEXCEPT_EXPR(swap(std::declval<Head&>(), std::declval<Head&>()))
&& SPROUT_NOEXCEPT_EXPR(tail(t).swap(tail(t)))
void swap(tuple_impl& t)
SPROUT_NOEXCEPT_EXPR(
SPROUT_NOEXCEPT_EXPR(sprout::swap(head(std::declval<Head&>()), head(t)))
&& SPROUT_NOEXCEPT_EXPR(inherited_type::swap(tail(t)))
)
{
using std::swap;
swap(head(*this), head(t));
sprout::swap(head(*this), head(t));
inherited_type::swap(tail(t));
}
public:
@ -318,7 +320,9 @@ namespace sprout {
static_cast<inherited_type&>(*this) = rhs;
return *this;
}
tuple& operator=(tuple&& rhs) SPROUT_NOEXCEPT_EXPR(std::is_nothrow_move_assignable<inherited_type>::value) {
tuple& operator=(tuple&& rhs)
SPROUT_NOEXCEPT_EXPR(std::is_nothrow_move_assignable<inherited_type>::value)
{
static_cast<inherited_type&>(*this) = sprout::move(rhs);
return *this;
}
@ -333,7 +337,9 @@ namespace sprout {
return *this;
}
// tuple swap
void swap(tuple& other) SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(inherited_type::swap(other))) {
void swap(tuple& other)
SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(inherited_type::swap(other)))
{
inherited_type::swap(other);
}
};
@ -348,10 +354,9 @@ namespace sprout {
// swap
//
template<typename... Types>
inline void swap(
sprout::tuples::tuple<Types...>& lhs,
sprout::tuples::tuple<Types...>& rhs
) SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(lhs.swap(rhs)))
inline void
swap(sprout::tuples::tuple<Types...>& lhs, sprout::tuples::tuple<Types...>& rhs)
SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(lhs.swap(rhs)))
{
lhs.swap(rhs);
}