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

@ -14,27 +14,33 @@ namespace sprout {
// operator>=
//
template<typename Container>
inline SPROUT_CONSTEXPR bool operator==(sprout::pit<Container> const& lhs, sprout::pit<Container> const& rhs) {
inline SPROUT_CONSTEXPR bool
operator==(sprout::pit<Container> const& lhs, sprout::pit<Container> const& rhs) {
return lhs.front() == rhs.front();
}
template<typename Container>
inline SPROUT_CONSTEXPR bool operator!=(sprout::pit<Container> const& lhs, sprout::pit<Container> const& rhs) {
inline SPROUT_CONSTEXPR bool
operator!=(sprout::pit<Container> const& lhs, sprout::pit<Container> const& rhs) {
return !(lhs == rhs);
}
template<typename Container>
inline SPROUT_CONSTEXPR bool operator<(sprout::pit<Container> const& lhs, sprout::pit<Container> const& rhs) {
inline SPROUT_CONSTEXPR bool
operator<(sprout::pit<Container> const& lhs, sprout::pit<Container> const& rhs) {
return lhs.front() < rhs.front();
}
template<typename Container>
inline SPROUT_CONSTEXPR bool operator>(sprout::pit<Container> const& lhs, sprout::pit<Container> const& rhs) {
inline SPROUT_CONSTEXPR bool
operator>(sprout::pit<Container> const& lhs, sprout::pit<Container> const& rhs) {
return rhs < lhs;
}
template<typename Container>
inline SPROUT_CONSTEXPR bool operator<=(sprout::pit<Container> const& lhs, sprout::pit<Container> const& rhs) {
inline SPROUT_CONSTEXPR bool
operator<=(sprout::pit<Container> const& lhs, sprout::pit<Container> const& rhs) {
return !(rhs < lhs);
}
template<typename Container>
inline SPROUT_CONSTEXPR bool operator>=(sprout::pit<Container> const& lhs, sprout::pit<Container> const& rhs) {
inline SPROUT_CONSTEXPR bool
operator>=(sprout::pit<Container> const& lhs, sprout::pit<Container> const& rhs) {
return !(lhs < rhs);
}
} // namespace sprout

View file

@ -17,20 +17,18 @@ namespace sprout {
typedef typename sprout::container_construct_traits<Container>::copied_type copied_type;
public:
template<typename Cont>
static SPROUT_CONSTEXPR copied_type deep_copy(Cont&& cont) {
static SPROUT_CONSTEXPR copied_type
deep_copy(Cont&& cont) {
return copied_type();
}
template<typename... Args>
static SPROUT_CONSTEXPR copied_type make(Args&&... args) {
static SPROUT_CONSTEXPR copied_type
make(Args&&... args) {
return sprout::make<copied_type>(sprout::forward<Args>(args)...);
}
template<typename Cont, typename... Args>
static SPROUT_CONSTEXPR copied_type remake(
Cont&& cont,
typename sprout::container_traits<sprout::pit<Container> >::difference_type size,
Args&&... args
)
{
static SPROUT_CONSTEXPR copied_type
remake(Cont&& cont, typename sprout::container_traits<sprout::pit<Container> >::difference_type size, Args&&... args) {
return sprout::remake<copied_type>(sprout::forward<Cont>(cont), size, sprout::forward<Args>(args)...);
}
};

View file

@ -8,7 +8,8 @@
namespace sprout {
template<typename Container>
inline SPROUT_CONSTEXPR std::size_t hash_value(sprout::pit<Container> const& v) {
inline SPROUT_CONSTEXPR std::size_t
hash_value(sprout::pit<Container> const& v) {
return sprout::to_hash(v.elem);
}
} // namespace sprout

View file

@ -9,6 +9,7 @@
#include <sprout/iterator/operation.hpp>
#include <sprout/iterator/reverse_iterator.hpp>
#include <sprout/iterator/value_iterator.hpp>
#include <sprout/utility/swap.hpp>
namespace sprout {
//
@ -35,9 +36,10 @@ namespace sprout {
value_type elem;
public:
pit() = default;
void swap(pit& other) SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(std::swap(std::declval<value_type&>(), std::declval<value_type&>()))) {
using std::swap;
swap(elem, other.elem);
void swap(pit& other)
SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::swap(elem, other.elem)))
{
sprout::swap(elem, other.elem);
}
// iterators:
iterator begin() {
@ -131,7 +133,10 @@ namespace sprout {
// swap
//
template<typename Container>
inline void swap(sprout::pit<Container>& lhs, sprout::pit<Container>& rhs) SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(lhs.swap(rhs))) {
inline void
swap(sprout::pit<Container>& lhs, sprout::pit<Container>& rhs)
SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(lhs.swap(rhs)))
{
lhs.swap(rhs);
}
} // namespace sprout

View file

@ -8,7 +8,7 @@
#include <sprout/utility/move.hpp>
#include <sprout/tuple/tuple/get.hpp>
namespace sprout_adl {
namespace sprout {
//
// tuple_get
//
@ -27,11 +27,11 @@ namespace sprout_adl {
template<std::size_t I, typename Container>
inline SPROUT_CONSTEXPR typename sprout::container_traits<sprout::pit<Container> >::value_type&&
tuple_get(sprout::pit<Container>&& t)
SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::move(sprout::tuples::get<I>(t))))
SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::move(sprout::tuples::get<I>(t))))
{
return sprout::move(sprout::tuples::get<I>(t));
}
} // namespace sprout_adl
} // namespace sprout
namespace std {
//