mirror of
https://github.com/bolero-MURAKAMI/Sprout
synced 2025-08-03 12:49:50 +00:00
最初
This commit is contained in:
commit
b3bb8121e8
362 changed files with 16820 additions and 0 deletions
57
sprout/operation/fit/erase.hpp
Normal file
57
sprout/operation/fit/erase.hpp
Normal file
|
@ -0,0 +1,57 @@
|
|||
#ifndef SPROUT_OPERATION_FIT_ERASE_HPP
|
||||
#define SPROUT_OPERATION_FIT_ERASE_HPP
|
||||
|
||||
#include <cstddef>
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/operation/fixed/erase.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace fit {
|
||||
namespace result_of {
|
||||
//
|
||||
// erase
|
||||
//
|
||||
template<typename Container>
|
||||
struct erase {
|
||||
public:
|
||||
typedef sprout::sub_array<typename sprout::fixed::result_of::erase<Container>::type> type;
|
||||
};
|
||||
} // namespace result_of
|
||||
|
||||
//
|
||||
// erase
|
||||
//
|
||||
template<typename Container>
|
||||
SPROUT_CONSTEXPR inline typename sprout::fit::result_of::erase<Container>::type erase(
|
||||
Container const& cont,
|
||||
typename sprout::fixed_container_traits<Container>::const_iterator pos
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::erase(cont, pos),
|
||||
sprout::fixed_begin_offset(cont),
|
||||
sprout::fixed_end_offset(cont) - 1
|
||||
);
|
||||
}
|
||||
//
|
||||
// erase
|
||||
//
|
||||
template<typename Container>
|
||||
SPROUT_CONSTEXPR inline typename sprout::fit::result_of::erase<Container>::type erase(
|
||||
Container const& cont,
|
||||
typename sprout::fixed_container_traits<Container>::difference_type pos
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::erase(cont, pos),
|
||||
sprout::fixed_begin_offset(cont),
|
||||
sprout::fixed_end_offset(cont) - 1
|
||||
);
|
||||
}
|
||||
} // namespace fit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_OPERATION_FIT_ERASE_HPP
|
57
sprout/operation/fit/erase_n.hpp
Normal file
57
sprout/operation/fit/erase_n.hpp
Normal file
|
@ -0,0 +1,57 @@
|
|||
#ifndef SPROUT_OPERATION_FIT_ERASE_N_HPP
|
||||
#define SPROUT_OPERATION_FIT_ERASE_N_HPP
|
||||
|
||||
#include <cstddef>
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/operation/fixed/erase_n.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace fit {
|
||||
namespace result_of {
|
||||
//
|
||||
// erase_n
|
||||
//
|
||||
template<std::size_t N, typename Container>
|
||||
struct erase_n {
|
||||
public:
|
||||
typedef sprout::sub_array<typename sprout::fixed::result_of::erase_n<N, Container>::type> type;
|
||||
};
|
||||
} // namespace result_of
|
||||
|
||||
//
|
||||
// erase_n
|
||||
//
|
||||
template<std::size_t N, typename Container>
|
||||
SPROUT_CONSTEXPR inline typename sprout::fit::result_of::erase_n<N, Container>::type erase_n(
|
||||
Container const& cont,
|
||||
typename sprout::fixed_container_traits<Container>::const_iterator pos
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::erase_n<N>(cont, pos),
|
||||
sprout::fixed_begin_offset(cont),
|
||||
sprout::fixed_end_offset(cont) - 1
|
||||
);
|
||||
}
|
||||
//
|
||||
// erase_n
|
||||
//
|
||||
template<std::size_t N, typename Container>
|
||||
SPROUT_CONSTEXPR inline typename sprout::fit::result_of::erase_n<N, Container>::type erase_n(
|
||||
Container const& cont,
|
||||
typename sprout::fixed_container_traits<Container>::difference_type pos
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::erase_n<N>(cont, pos),
|
||||
sprout::fixed_begin_offset(cont),
|
||||
sprout::fixed_end_offset(cont) - 1
|
||||
);
|
||||
}
|
||||
} // namespace fit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_OPERATION_FIT_ERASE_N_HPP
|
61
sprout/operation/fit/insert.hpp
Normal file
61
sprout/operation/fit/insert.hpp
Normal file
|
@ -0,0 +1,61 @@
|
|||
#ifndef SPROUT_OPERATION_FIT_INSERT_HPP
|
||||
#define SPROUT_OPERATION_FIT_INSERT_HPP
|
||||
|
||||
#include <cstddef>
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/operation/fixed/insert.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace fit {
|
||||
namespace result_of {
|
||||
//
|
||||
// insert
|
||||
//
|
||||
template<typename Container, typename T, typename... Values>
|
||||
struct insert {
|
||||
public:
|
||||
typedef sprout::sub_array<typename sprout::fixed::result_of::insert<Container, T, Values...>::type> type;
|
||||
};
|
||||
} // namespace result_of
|
||||
|
||||
//
|
||||
// insert
|
||||
//
|
||||
template<typename Container, typename T, typename... Values>
|
||||
SPROUT_CONSTEXPR inline typename sprout::fit::result_of::insert<Container, T, Values...>::type insert(
|
||||
Container const& cont,
|
||||
typename sprout::fixed_container_traits<Container>::const_iterator pos,
|
||||
T const& v,
|
||||
Values const&... values
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::insert(cont, pos, v, values...),
|
||||
sprout::fixed_begin_offset(cont),
|
||||
sprout::fixed_end_offset(cont) + 1 + sizeof...(Values)
|
||||
);
|
||||
}
|
||||
//
|
||||
// insert
|
||||
//
|
||||
template<typename Container, typename T, typename... Values>
|
||||
SPROUT_CONSTEXPR inline typename sprout::fit::result_of::insert<Container, T, Values...>::type insert(
|
||||
Container const& cont,
|
||||
typename sprout::fixed_container_traits<Container>::difference_type pos,
|
||||
T const& v,
|
||||
Values const&... values
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::insert(cont, pos, v, values...),
|
||||
sprout::fixed_begin_offset(cont),
|
||||
sprout::fixed_end_offset(cont) + 1 + sizeof...(Values)
|
||||
);
|
||||
}
|
||||
} // namespace fit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_OPERATION_FIT_INSERT_HPP
|
61
sprout/operation/fit/insert_n.hpp
Normal file
61
sprout/operation/fit/insert_n.hpp
Normal file
|
@ -0,0 +1,61 @@
|
|||
#ifndef SPROUT_OPERATION_FIT_INSERT_N_HPP
|
||||
#define SPROUT_OPERATION_FIT_INSERT_N_HPP
|
||||
|
||||
#include <cstddef>
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/operation/fixed/insert_n.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace fit {
|
||||
namespace result_of {
|
||||
//
|
||||
// insert_n
|
||||
//
|
||||
template<std::size_t N, typename Container, typename T, typename... Values>
|
||||
struct insert_n {
|
||||
public:
|
||||
typedef sprout::sub_array<typename sprout::fixed::result_of::insert_n<N, Container, T, Values...>::type> type;
|
||||
};
|
||||
} // namespace result_of
|
||||
|
||||
//
|
||||
// insert_n
|
||||
//
|
||||
template<std::size_t N, typename Container, typename T, typename... Values>
|
||||
SPROUT_CONSTEXPR inline typename sprout::fit::result_of::insert_n<N, Container, T, Values...>::type insert_n(
|
||||
Container const& cont,
|
||||
typename sprout::fixed_container_traits<Container>::const_iterator pos,
|
||||
T const& v,
|
||||
Values const&... values
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::insert_n<N>(cont, pos, v, values...),
|
||||
sprout::fixed_begin_offset(cont),
|
||||
sprout::fixed_end_offset(cont) + (1 + sizeof...(Values)) * N
|
||||
);
|
||||
}
|
||||
//
|
||||
// insert_n
|
||||
//
|
||||
template<std::size_t N, typename Container, typename T, typename... Values>
|
||||
SPROUT_CONSTEXPR inline typename sprout::fit::result_of::insert_n<N, Container, T, Values...>::type insert_n(
|
||||
Container const& cont,
|
||||
typename sprout::fixed_container_traits<Container>::difference_type pos,
|
||||
T const& v,
|
||||
Values const&... values
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::insert_n<N>(cont, pos, v, values...),
|
||||
sprout::fixed_begin_offset(cont),
|
||||
sprout::fixed_end_offset(cont) + (1 + sizeof...(Values)) * N
|
||||
);
|
||||
}
|
||||
} // namespace fit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_OPERATION_FIT_INSERT_N_HPP
|
58
sprout/operation/fit/join.hpp
Normal file
58
sprout/operation/fit/join.hpp
Normal file
|
@ -0,0 +1,58 @@
|
|||
#ifndef SPROUT_OPERATION_FIT_JOIN_HPP
|
||||
#define SPROUT_OPERATION_FIT_JOIN_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/operation/fixed/join.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace fit {
|
||||
namespace result_of {
|
||||
//
|
||||
// join
|
||||
//
|
||||
template<typename Container, typename Input>
|
||||
struct join {
|
||||
public:
|
||||
typedef sprout::sub_array<typename sprout::fixed::result_of::join<Container, Input>::type> type;
|
||||
};
|
||||
} // namespace result_of
|
||||
|
||||
//
|
||||
// join
|
||||
//
|
||||
template<typename Container, typename Input>
|
||||
SPROUT_CONSTEXPR inline typename sprout::fit::result_of::join<Container, Input>::type join(
|
||||
Container const& cont,
|
||||
typename sprout::fixed_container_traits<Container>::const_iterator pos,
|
||||
Input const& input
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::join(cont, pos, input),
|
||||
sprout::fixed_begin_offset(cont),
|
||||
sprout::fixed_end_offset(cont) + sprout::size(input)
|
||||
);
|
||||
}
|
||||
//
|
||||
// join
|
||||
//
|
||||
template<typename Container, typename Input>
|
||||
SPROUT_CONSTEXPR inline typename sprout::fit::result_of::join<Container, Input>::type join(
|
||||
Container const& cont,
|
||||
typename sprout::fixed_container_traits<Container>::difference_type pos,
|
||||
Input const& input
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::join(cont, pos, input),
|
||||
sprout::fixed_begin_offset(cont),
|
||||
sprout::fixed_end_offset(cont) + sprout::size(input)
|
||||
);
|
||||
}
|
||||
} // namespace fit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_OPERATION_FIT_JOIN_HPP
|
40
sprout/operation/fit/join_back.hpp
Normal file
40
sprout/operation/fit/join_back.hpp
Normal file
|
@ -0,0 +1,40 @@
|
|||
#ifndef SPROUT_OPERATION_FIT_JOIN_BACK_HPP
|
||||
#define SPROUT_OPERATION_FIT_JOIN_BACK_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/operation/fixed/join_back.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace fit {
|
||||
namespace result_of {
|
||||
//
|
||||
// join_back
|
||||
//
|
||||
template<typename Container, typename Input>
|
||||
struct join_back {
|
||||
typedef sprout::sub_array<typename sprout::fixed::result_of::join_back<Container, Input>::type> type;
|
||||
};
|
||||
} // namespace result_of
|
||||
|
||||
//
|
||||
// join_back
|
||||
//
|
||||
template<typename Container, typename Input>
|
||||
SPROUT_CONSTEXPR inline typename sprout::fit::result_of::join_back<Container, Input>::type join_back(
|
||||
Container const& cont,
|
||||
Input const& input
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::join_back(cont, input),
|
||||
sprout::fixed_begin_offset(cont),
|
||||
sprout::fixed_end_offset(cont) + sprout::size(input)
|
||||
);
|
||||
}
|
||||
} // namespace fit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_OPERATION_FIT_JOIN_BACK_HPP
|
40
sprout/operation/fit/join_front.hpp
Normal file
40
sprout/operation/fit/join_front.hpp
Normal file
|
@ -0,0 +1,40 @@
|
|||
#ifndef SPROUT_OPERATION_FIT_JOIN_FRONT_HPP
|
||||
#define SPROUT_OPERATION_FIT_JOIN_FRONT_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/operation/fixed/join_front.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace fit {
|
||||
namespace result_of {
|
||||
//
|
||||
// join_front
|
||||
//
|
||||
template<typename Container, typename Input>
|
||||
struct join_front {
|
||||
typedef sprout::sub_array<typename sprout::fixed::result_of::join_front<Container, Input>::type> type;
|
||||
};
|
||||
} // namespace result_of
|
||||
|
||||
//
|
||||
// join_front
|
||||
//
|
||||
template<typename Container, typename Input>
|
||||
SPROUT_CONSTEXPR inline typename sprout::fit::result_of::join_front<Container, Input>::type join_front(
|
||||
Container const& cont,
|
||||
Input const& input
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::join_front(cont, input),
|
||||
sprout::fixed_begin_offset(cont),
|
||||
sprout::fixed_end_offset(cont) + sprout::size(input)
|
||||
);
|
||||
}
|
||||
} // namespace fit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_OPERATION_FIT_JOIN_FRONT_HPP
|
41
sprout/operation/fit/pop_back.hpp
Normal file
41
sprout/operation/fit/pop_back.hpp
Normal file
|
@ -0,0 +1,41 @@
|
|||
#ifndef SPROUT_OPERATION_FIT_POP_BACK_HPP
|
||||
#define SPROUT_OPERATION_FIT_POP_BACK_HPP
|
||||
|
||||
#include <cstddef>
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/operation/fixed/pop_back.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace fit {
|
||||
namespace result_of {
|
||||
//
|
||||
// pop_back
|
||||
//
|
||||
template<typename Container>
|
||||
struct pop_back {
|
||||
public:
|
||||
typedef sprout::sub_array<typename sprout::fixed::result_of::pop_back<Container>::type> type;
|
||||
};
|
||||
} // namespace result_of
|
||||
|
||||
//
|
||||
// pop_back
|
||||
//
|
||||
template<typename Container>
|
||||
SPROUT_CONSTEXPR inline typename sprout::fit::result_of::pop_back<Container>::type pop_back(
|
||||
Container const& cont
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::pop_back(cont),
|
||||
sprout::fixed_begin_offset(cont),
|
||||
sprout::fixed_end_offset(cont) - 1
|
||||
);
|
||||
}
|
||||
} // namespace fit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_OPERATION_FIT_POP_BACK_HPP
|
41
sprout/operation/fit/pop_back_n.hpp
Normal file
41
sprout/operation/fit/pop_back_n.hpp
Normal file
|
@ -0,0 +1,41 @@
|
|||
#ifndef SPROUT_OPERATION_FIT_POP_BACK_N_HPP
|
||||
#define SPROUT_OPERATION_FIT_POP_BACK_N_HPP
|
||||
|
||||
#include <cstddef>
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/operation/fixed/pop_back_n.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace fit {
|
||||
namespace result_of {
|
||||
//
|
||||
// pop_back_n
|
||||
//
|
||||
template<std::size_t N, typename Container>
|
||||
struct pop_back_n {
|
||||
public:
|
||||
typedef sprout::sub_array<typename sprout::fixed::result_of::pop_back_n<N, Container>::type> type;
|
||||
};
|
||||
} // namespace result_of
|
||||
|
||||
//
|
||||
// pop_back_n
|
||||
//
|
||||
template<std::size_t N, typename Container>
|
||||
SPROUT_CONSTEXPR inline typename sprout::fit::result_of::pop_back_n<N, Container>::type pop_back_n(
|
||||
Container const& cont
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::pop_back_n<N>(cont),
|
||||
sprout::fixed_begin_offset(cont),
|
||||
sprout::fixed_end_offset(cont) - N
|
||||
);
|
||||
}
|
||||
} // namespace fit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_OPERATION_FIT_POP_BACK_N_HPP
|
41
sprout/operation/fit/pop_front.hpp
Normal file
41
sprout/operation/fit/pop_front.hpp
Normal file
|
@ -0,0 +1,41 @@
|
|||
#ifndef SPROUT_OPERATION_FIT_POP_FRONT_HPP
|
||||
#define SPROUT_OPERATION_FIT_POP_FRONT_HPP
|
||||
|
||||
#include <cstddef>
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/operation/fixed/pop_front.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace fit {
|
||||
namespace result_of {
|
||||
//
|
||||
// pop_front
|
||||
//
|
||||
template<typename Container>
|
||||
struct pop_front {
|
||||
public:
|
||||
typedef sprout::sub_array<typename sprout::fixed::result_of::pop_front<Container>::type> type;
|
||||
};
|
||||
} // namespace result_of
|
||||
|
||||
//
|
||||
// pop_front
|
||||
//
|
||||
template<typename Container>
|
||||
SPROUT_CONSTEXPR inline typename sprout::fit::result_of::pop_front<Container>::type pop_front(
|
||||
Container const& cont
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::pop_front(cont),
|
||||
sprout::fixed_begin_offset(cont),
|
||||
sprout::fixed_end_offset(cont) - 1
|
||||
);
|
||||
}
|
||||
} // namespace fit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_OPERATION_FIT_POP_FRONT_HPP
|
41
sprout/operation/fit/pop_front_n.hpp
Normal file
41
sprout/operation/fit/pop_front_n.hpp
Normal file
|
@ -0,0 +1,41 @@
|
|||
#ifndef SPROUT_OPERATION_FIT_POP_FRONT_N_HPP
|
||||
#define SPROUT_OPERATION_FIT_POP_FRONT_N_HPP
|
||||
|
||||
#include <cstddef>
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/operation/fixed/pop_front_n.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace fit {
|
||||
namespace result_of {
|
||||
//
|
||||
// pop_front_n
|
||||
//
|
||||
template<std::size_t N, typename Container>
|
||||
struct pop_front_n {
|
||||
public:
|
||||
typedef sprout::sub_array<typename sprout::fixed::result_of::pop_front_n<N, Container>::type> type;
|
||||
};
|
||||
} // namespace result_of
|
||||
|
||||
//
|
||||
// pop_front_n
|
||||
//
|
||||
template<std::size_t N, typename Container>
|
||||
SPROUT_CONSTEXPR inline typename sprout::fit::result_of::pop_front_n<N, Container>::type pop_front_n(
|
||||
Container const& cont
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::pop_front_n<N>(cont),
|
||||
sprout::fixed_begin_offset(cont),
|
||||
sprout::fixed_end_offset(cont) - N
|
||||
);
|
||||
}
|
||||
} // namespace fit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_OPERATION_FIT_POP_FRONT_N_HPP
|
42
sprout/operation/fit/push_back.hpp
Normal file
42
sprout/operation/fit/push_back.hpp
Normal file
|
@ -0,0 +1,42 @@
|
|||
#ifndef SPROUT_OPERATION_FIT_PUSH_BACK_HPP
|
||||
#define SPROUT_OPERATION_FIT_PUSH_BACK_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/operation/fixed/push_back.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace fit {
|
||||
namespace result_of {
|
||||
//
|
||||
// push_back
|
||||
//
|
||||
template<typename Container, typename T, typename... Values>
|
||||
struct push_back {
|
||||
public:
|
||||
typedef sprout::sub_array<typename sprout::fixed::result_of::push_back<Container, T, Values...>::type> type;
|
||||
};
|
||||
} // namespace result_of
|
||||
|
||||
//
|
||||
// push_back
|
||||
//
|
||||
template<typename Container, typename T, typename... Values>
|
||||
SPROUT_CONSTEXPR inline typename sprout::fit::result_of::push_back<Container, T, Values...>::type push_back(
|
||||
Container const& cont,
|
||||
T const& v,
|
||||
Values const&... values
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::push_back(cont, v, values...),
|
||||
sprout::fixed_begin_offset(cont),
|
||||
sprout::fixed_end_offset(cont) + 1 + sizeof...(Values)
|
||||
);
|
||||
}
|
||||
} // namespace fit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_OPERATION_FIT_PUSH_BACK_HPP
|
42
sprout/operation/fit/push_back_n.hpp
Normal file
42
sprout/operation/fit/push_back_n.hpp
Normal file
|
@ -0,0 +1,42 @@
|
|||
#ifndef SPROUT_OPERATION_FIT_PUSH_BACK_N_HPP
|
||||
#define SPROUT_OPERATION_FIT_PUSH_BACK_N_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/operation/fixed/push_back_n.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace fit {
|
||||
namespace result_of {
|
||||
//
|
||||
// push_back_n
|
||||
//
|
||||
template<std::size_t N, typename Container, typename T, typename... Values>
|
||||
struct push_back_n {
|
||||
public:
|
||||
typedef sprout::sub_array<typename sprout::fixed::result_of::push_back_n<N, Container, T, Values...>::type> type;
|
||||
};
|
||||
} // namespace result_of
|
||||
|
||||
//
|
||||
// push_back_n
|
||||
//
|
||||
template<std::size_t N, typename Container, typename T, typename... Values>
|
||||
SPROUT_CONSTEXPR inline typename sprout::fit::result_of::push_back_n<N, Container, T, Values...>::type push_back_n(
|
||||
Container const& cont,
|
||||
T const& v,
|
||||
Values const&... values
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::push_back_n<N>(cont, v, values...),
|
||||
sprout::fixed_begin_offset(cont),
|
||||
sprout::fixed_end_offset(cont) + (1 + sizeof...(Values)) * N
|
||||
);
|
||||
}
|
||||
} // namespace fit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_OPERATION_FIT_PUSH_BACK_N_HPP
|
42
sprout/operation/fit/push_front.hpp
Normal file
42
sprout/operation/fit/push_front.hpp
Normal file
|
@ -0,0 +1,42 @@
|
|||
#ifndef SPROUT_OPERATION_FIT_PUSH_FRONT_HPP
|
||||
#define SPROUT_OPERATION_FIT_PUSH_FRONT_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/operation/fixed/push_front.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace fit {
|
||||
namespace result_of {
|
||||
//
|
||||
// push_front
|
||||
//
|
||||
template<typename Container, typename T, typename... Values>
|
||||
struct push_front {
|
||||
public:
|
||||
typedef sprout::sub_array<typename sprout::fixed::result_of::push_front<Container, T, Values...>::type> type;
|
||||
};
|
||||
} // namespace result_of
|
||||
|
||||
//
|
||||
// push_front
|
||||
//
|
||||
template<typename Container, typename T, typename... Values>
|
||||
SPROUT_CONSTEXPR inline typename sprout::fit::result_of::push_front<Container, T, Values...>::type push_front(
|
||||
Container const& cont,
|
||||
T const& v,
|
||||
Values const&... values
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::push_front(cont, v, values...),
|
||||
sprout::fixed_begin_offset(cont),
|
||||
sprout::fixed_end_offset(cont) + 1 + sizeof...(Values)
|
||||
);
|
||||
}
|
||||
} // namespace fit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_OPERATION_FIT_PUSH_FRONT_HPP
|
42
sprout/operation/fit/push_front_n.hpp
Normal file
42
sprout/operation/fit/push_front_n.hpp
Normal file
|
@ -0,0 +1,42 @@
|
|||
#ifndef SPROUT_OPERATION_FIT_PUSH_FRONT_N_HPP
|
||||
#define SPROUT_OPERATION_FIT_PUSH_FRONT_N_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/operation/fixed/push_front_n.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace fit {
|
||||
namespace result_of {
|
||||
//
|
||||
// push_front_n
|
||||
//
|
||||
template<std::size_t N, typename Container, typename T, typename... Values>
|
||||
struct push_front_n {
|
||||
public:
|
||||
typedef sprout::sub_array<typename sprout::fixed::result_of::push_front_n<N, Container, T, Values...>::type> type;
|
||||
};
|
||||
} // namespace result_of
|
||||
|
||||
//
|
||||
// push_front_n
|
||||
//
|
||||
template<std::size_t N, typename Container, typename T, typename... Values>
|
||||
SPROUT_CONSTEXPR inline typename sprout::fit::result_of::push_front_n<N, Container, T, Values...>::type push_front_n(
|
||||
Container const& cont,
|
||||
T const& v,
|
||||
Values const&... values
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::push_front_n<N>(cont, v, values...),
|
||||
sprout::fixed_begin_offset(cont),
|
||||
sprout::fixed_end_offset(cont) + (1 + sizeof...(Values)) * N
|
||||
);
|
||||
}
|
||||
} // namespace fit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_OPERATION_FIT_PUSH_FRONT_N_HPP
|
56
sprout/operation/fit/realign.hpp
Normal file
56
sprout/operation/fit/realign.hpp
Normal file
|
@ -0,0 +1,56 @@
|
|||
#ifndef SPROUT_OPERATION_FIT_REALIGN_HPP
|
||||
#define SPROUT_OPERATION_FIT_REALIGN_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/operation/fixed/realign.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace fit {
|
||||
namespace result_of {
|
||||
//
|
||||
// realign
|
||||
//
|
||||
template<typename Container>
|
||||
struct realign {
|
||||
public:
|
||||
typedef sprout::sub_array<typename sprout::fixed::result_of::realign<Container>::type> type;
|
||||
};
|
||||
} // namespace result_of
|
||||
|
||||
//
|
||||
// realign
|
||||
//
|
||||
template<typename Container, typename T>
|
||||
SPROUT_CONSTEXPR inline typename sprout::fit::result_of::realign<Container>::type realign(
|
||||
Container const& cont,
|
||||
T const& v
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::realign(cont, v),
|
||||
0,
|
||||
sprout::size(cont)
|
||||
);
|
||||
}
|
||||
|
||||
//
|
||||
// realign
|
||||
//
|
||||
template<typename Container>
|
||||
SPROUT_CONSTEXPR inline typename sprout::fit::result_of::realign<Container>::type realign(
|
||||
Container const& cont
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::realign(cont),
|
||||
0,
|
||||
sprout::size(cont)
|
||||
);
|
||||
}
|
||||
} // namespace fit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_OPERATION_FIT_REALIGN_HPP
|
56
sprout/operation/fit/realign_to.hpp
Normal file
56
sprout/operation/fit/realign_to.hpp
Normal file
|
@ -0,0 +1,56 @@
|
|||
#ifndef SPROUT_OPERATION_FIT_REALIGN_TO_HPP
|
||||
#define SPROUT_OPERATION_FIT_REALIGN_TO_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/operation/fixed/realign_to.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace fit {
|
||||
namespace result_of {
|
||||
//
|
||||
// realign_to
|
||||
//
|
||||
template<typename Result, typename Container>
|
||||
struct realign_to {
|
||||
public:
|
||||
typedef sprout::sub_array<typename sprout::fixed::result_of::realign_to<Result, Container>::type> type;
|
||||
};
|
||||
} // namespace result_of
|
||||
|
||||
//
|
||||
// realign_to
|
||||
//
|
||||
template<typename Result, typename Container, typename T>
|
||||
SPROUT_CONSTEXPR inline typename sprout::fit::result_of::realign_to<Result, Container>::type realign_to(
|
||||
Container const& cont,
|
||||
T const& v
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::realign_to<Result>(cont, v),
|
||||
0,
|
||||
sprout::size(cont)
|
||||
);
|
||||
}
|
||||
|
||||
//
|
||||
// realign_to
|
||||
//
|
||||
template<typename Result, typename Container>
|
||||
SPROUT_CONSTEXPR inline typename sprout::fit::result_of::realign_to<Result, Container>::type realign_to(
|
||||
Container const& cont
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::realign_to<Result>(cont),
|
||||
0,
|
||||
sprout::size(cont)
|
||||
);
|
||||
}
|
||||
} // namespace fit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_OPERATION_FIT_REALIGN_TO_HPP
|
57
sprout/operation/fit/resize.hpp
Normal file
57
sprout/operation/fit/resize.hpp
Normal file
|
@ -0,0 +1,57 @@
|
|||
#ifndef SPROUT_OPERATION_FIT_RESIZE_HPP
|
||||
#define SPROUT_OPERATION_FIT_RESIZE_HPP
|
||||
|
||||
#include <cstddef>
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/operation/fixed/resize.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace fit {
|
||||
namespace result_of {
|
||||
//
|
||||
// resize
|
||||
//
|
||||
template<std::size_t N, typename Container>
|
||||
struct resize {
|
||||
public:
|
||||
typedef sprout::sub_array<typename sprout::fixed::result_of::resize<N, Container>::type> type;
|
||||
};
|
||||
} // namespace result_of
|
||||
|
||||
//
|
||||
// resize
|
||||
//
|
||||
template<std::size_t N, typename Container, typename T>
|
||||
SPROUT_CONSTEXPR inline typename sprout::fit::result_of::resize<N, Container>::type resize(
|
||||
Container const& cont,
|
||||
T const& v
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::resize<N>(cont, v),
|
||||
0,
|
||||
sprout::fixed_container_traits<typename sprout::fit::result_of::resize<N, Container>::type>::fixed_size
|
||||
);
|
||||
}
|
||||
|
||||
//
|
||||
// resize
|
||||
//
|
||||
template<std::size_t N, typename Container>
|
||||
SPROUT_CONSTEXPR inline typename sprout::fit::result_of::resize<N, Container>::type resize(
|
||||
Container const& cont
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::resize<N>(cont),
|
||||
0,
|
||||
sprout::fixed_container_traits<typename sprout::fit::result_of::resize<N, Container>::type>::fixed_size
|
||||
);
|
||||
}
|
||||
} // namespace fit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_OPERATION_FIT_RESIZE_HPP
|
57
sprout/operation/fit/resize_backward.hpp
Normal file
57
sprout/operation/fit/resize_backward.hpp
Normal file
|
@ -0,0 +1,57 @@
|
|||
#ifndef SPROUT_OPERATION_FIT_RESIZE_BACKWARD_HPP
|
||||
#define SPROUT_OPERATION_FIT_RESIZE_BACKWARD_HPP
|
||||
|
||||
#include <cstddef>
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/operation/fixed/resize_backward.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace fit {
|
||||
namespace result_of {
|
||||
//
|
||||
// resize_backward
|
||||
//
|
||||
template<std::size_t N, typename Container>
|
||||
struct resize_backward {
|
||||
public:
|
||||
typedef sprout::sub_array<typename sprout::fixed::result_of::resize_backward<N, Container>::type> type;
|
||||
};
|
||||
} // namespace result_of
|
||||
|
||||
//
|
||||
// resize_backward
|
||||
//
|
||||
template<std::size_t N, typename Container, typename T>
|
||||
SPROUT_CONSTEXPR inline typename sprout::fit::result_of::resize_backward<N, Container>::type resize_backward(
|
||||
Container const& cont,
|
||||
T const& v
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::resize_backward<N>(cont, v),
|
||||
0,
|
||||
sprout::fixed_container_traits<typename sprout::fit::result_of::resize_backward<N, Container>::type>::fixed_size
|
||||
);
|
||||
}
|
||||
|
||||
//
|
||||
// resize_backward
|
||||
//
|
||||
template<std::size_t N, typename Container>
|
||||
SPROUT_CONSTEXPR inline typename sprout::fit::result_of::resize_backward<N, Container>::type resize_backward(
|
||||
Container const& cont
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::resize_backward<N>(cont),
|
||||
0,
|
||||
sprout::fixed_container_traits<typename sprout::fit::result_of::resize_backward<N, Container>::type>::fixed_size
|
||||
);
|
||||
}
|
||||
} // namespace fit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_OPERATION_FIT_RESIZE_BACKWARD_HPP
|
Loading…
Add table
Add a link
Reference in a new issue