mirror of
https://github.com/bolero-MURAKAMI/Sprout
synced 2025-07-02 14:04:09 +00:00
add new signatures: some algorithms
This commit is contained in:
parent
9a593cbb81
commit
48f1b2d615
12 changed files with 137 additions and 9 deletions
|
@ -9,6 +9,7 @@
|
|||
#include <sprout/container/functions.hpp>
|
||||
#include <sprout/iterator/operation.hpp>
|
||||
#include <sprout/algorithm/fixed/result_of.hpp>
|
||||
#include <sprout/pit.hpp>
|
||||
#include <sprout/detail/container_complate.hpp>
|
||||
|
||||
namespace sprout {
|
||||
|
@ -116,6 +117,12 @@ namespace sprout {
|
|||
typedef typename std::iterator_traits<ForwardIterator>::iterator_category* category;
|
||||
return sprout::fixed::detail::swap_element_copy(first, last, result, pos1, pos2, category());
|
||||
}
|
||||
|
||||
template<typename Result, typename ForwardIterator>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::result_of::algorithm<Result>::type
|
||||
swap_element_copy(ForwardIterator first, ForwardIterator last, ForwardIterator pos1, ForwardIterator pos2) {
|
||||
return sprout::fixed::swap_element_copy(first, last, sprout::pit<Result>(), pos1, pos2);
|
||||
}
|
||||
} // namespace fixed
|
||||
|
||||
using sprout::fixed::swap_element_copy;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue