mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2025-02-27 11:23:56 +00:00
fix coding-style
This commit is contained in:
parent
df3023db30
commit
5ce2cb023c
196 changed files with 1180 additions and 1787 deletions
|
@ -11,7 +11,8 @@ namespace sprout {
|
|||
|
||||
// 25.2.8 Adjacent find
|
||||
template<typename ForwardIterator, typename BinaryPredicate>
|
||||
inline SPROUT_CONSTEXPR ForwardIterator adjacent_find(ForwardIterator first, ForwardIterator last, BinaryPredicate pred) {
|
||||
inline SPROUT_CONSTEXPR ForwardIterator
|
||||
adjacent_find(ForwardIterator first, ForwardIterator last, BinaryPredicate pred) {
|
||||
return first == last || sprout::next(first) == last ? last
|
||||
: pred(*first, *(sprout::next(first))) != false ? first
|
||||
: sprout::adjacent_find(sprout::next(first), last, pred)
|
||||
|
@ -19,10 +20,10 @@ namespace sprout {
|
|||
}
|
||||
|
||||
template<typename ForwardIterator>
|
||||
inline SPROUT_CONSTEXPR ForwardIterator adjacent_find(ForwardIterator first, ForwardIterator last) {
|
||||
inline SPROUT_CONSTEXPR ForwardIterator
|
||||
adjacent_find(ForwardIterator first, ForwardIterator last) {
|
||||
return sprout::adjacent_find(
|
||||
first,
|
||||
last,
|
||||
first, last,
|
||||
NS_SSCRISK_CEL_OR_SPROUT::equal_to<typename std::iterator_traits<ForwardIterator>::value_type>()
|
||||
);
|
||||
}
|
||||
|
|
|
@ -9,7 +9,8 @@ namespace sprout {
|
|||
|
||||
// 25.2.1 All of
|
||||
template<typename InputIterator, typename Predicate>
|
||||
inline SPROUT_CONSTEXPR bool all_of(InputIterator first, InputIterator last, Predicate pred) {
|
||||
inline SPROUT_CONSTEXPR bool
|
||||
all_of(InputIterator first, InputIterator last, Predicate pred) {
|
||||
return first == last ? true
|
||||
: pred(*first) == true && sprout::all_of(sprout::next(first), last, pred)
|
||||
;
|
||||
|
|
|
@ -9,7 +9,8 @@ namespace sprout {
|
|||
|
||||
// 25.2.2 Any of
|
||||
template<typename InputIterator, typename Predicate>
|
||||
inline SPROUT_CONSTEXPR bool any_of(InputIterator first, InputIterator last, Predicate pred) {
|
||||
inline SPROUT_CONSTEXPR bool
|
||||
any_of(InputIterator first, InputIterator last, Predicate pred) {
|
||||
return first == last ? false
|
||||
: pred(*first) == true || sprout::any_of(sprout::next(first), last, pred)
|
||||
;
|
||||
|
|
|
@ -10,7 +10,8 @@ namespace sprout {
|
|||
|
||||
// 25.4.3.4 binary_search
|
||||
template<typename ForwardIterator, typename T>
|
||||
inline SPROUT_CONSTEXPR bool binary_search(ForwardIterator first, ForwardIterator last, T const& value) {
|
||||
inline SPROUT_CONSTEXPR bool
|
||||
binary_search(ForwardIterator first, ForwardIterator last, T const& value) {
|
||||
return first == last ? false
|
||||
: sprout::next(first) == last ? !(*first < value) && !(value < *first) ? true : false
|
||||
: *sprout::next(first, NS_SSCRISK_CEL_OR_SPROUT::distance(first, last) / 2) < value
|
||||
|
@ -22,7 +23,8 @@ namespace sprout {
|
|||
}
|
||||
|
||||
template<typename ForwardIterator, typename T, typename Compare>
|
||||
inline SPROUT_CONSTEXPR bool binary_search(ForwardIterator first, ForwardIterator last, T const& value, Compare comp) {
|
||||
inline SPROUT_CONSTEXPR bool
|
||||
binary_search(ForwardIterator first, ForwardIterator last, T const& value, Compare comp) {
|
||||
return first == last ? false
|
||||
: sprout::next(first) == last ? !comp(*first, value) && !comp(value, *first) ? true : false
|
||||
: comp(*sprout::next(first, NS_SSCRISK_CEL_OR_SPROUT::distance(first, last) / 2), value)
|
||||
|
|
|
@ -9,25 +9,16 @@ namespace sprout {
|
|||
|
||||
// 25.2.11 Equal
|
||||
template<typename InputIterator1, typename InputIterator2>
|
||||
inline SPROUT_CONSTEXPR bool equal(
|
||||
InputIterator1 first1,
|
||||
InputIterator1 last1,
|
||||
InputIterator2 first2
|
||||
)
|
||||
{
|
||||
inline SPROUT_CONSTEXPR bool
|
||||
equal(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2) {
|
||||
return first1 == last1 ? true
|
||||
: *first1 == *first2 && sprout::equal(sprout::next(first1), last1, sprout::next(first2))
|
||||
;
|
||||
}
|
||||
|
||||
template<typename InputIterator1, typename InputIterator2, typename BinaryPredicate>
|
||||
inline SPROUT_CONSTEXPR bool equal(
|
||||
InputIterator1 first1,
|
||||
InputIterator1 last1,
|
||||
InputIterator2 first2,
|
||||
BinaryPredicate pred
|
||||
)
|
||||
{
|
||||
inline SPROUT_CONSTEXPR bool
|
||||
equal(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, BinaryPredicate pred) {
|
||||
return first1 == last1 ? true
|
||||
: pred(*first1, *first2) != false && sprout::equal(sprout::next(first1), last1, sprout::next(first2), pred)
|
||||
;
|
||||
|
|
|
@ -11,23 +11,14 @@ namespace sprout {
|
|||
|
||||
// 25.4.3.3 equal_range
|
||||
template<typename ForwardIterator, typename T>
|
||||
inline SPROUT_CONSTEXPR sprout::pair<ForwardIterator, ForwardIterator> equal_range(
|
||||
ForwardIterator first,
|
||||
ForwardIterator last,
|
||||
T const& value
|
||||
)
|
||||
{
|
||||
inline SPROUT_CONSTEXPR sprout::pair<ForwardIterator, ForwardIterator>
|
||||
equal_range(ForwardIterator first, ForwardIterator last, T const& value) {
|
||||
return {sprout::lower_bound(first, last, value), sprout::upper_bound(first, last, value)};
|
||||
}
|
||||
|
||||
template<typename ForwardIterator, typename T, typename Compare>
|
||||
inline SPROUT_CONSTEXPR pair<ForwardIterator, ForwardIterator> equal_range(
|
||||
ForwardIterator first,
|
||||
ForwardIterator last,
|
||||
T const& value,
|
||||
Compare comp
|
||||
)
|
||||
{
|
||||
inline SPROUT_CONSTEXPR pair<ForwardIterator, ForwardIterator>
|
||||
equal_range(ForwardIterator first, ForwardIterator last, T const& value, Compare comp) {
|
||||
return {sprout::lower_bound(first, last, value, comp), sprout::upper_bound(first, last, value, comp)};
|
||||
}
|
||||
} // namespace sprout
|
||||
|
|
|
@ -9,7 +9,8 @@ namespace sprout {
|
|||
|
||||
// 25.2.5 Find
|
||||
template<typename InputIterator, typename T>
|
||||
inline SPROUT_CONSTEXPR InputIterator find(InputIterator first, InputIterator last, T const& value) {
|
||||
inline SPROUT_CONSTEXPR InputIterator
|
||||
find(InputIterator first, InputIterator last, T const& value) {
|
||||
return first == last || *first == value ? first
|
||||
: sprout::find(sprout::next(first), last, value)
|
||||
;
|
||||
|
|
|
@ -12,7 +12,8 @@ namespace sprout {
|
|||
template<typename Iterator1, typename Iterator2>
|
||||
struct iter_equal_to {
|
||||
public:
|
||||
SPROUT_CONSTEXPR bool operator()(
|
||||
SPROUT_CONSTEXPR bool
|
||||
operator()(
|
||||
typename std::iterator_traits<Iterator1>::value_type const& x,
|
||||
typename std::iterator_traits<Iterator2>::value_type const& y
|
||||
) const
|
||||
|
@ -24,11 +25,10 @@ namespace sprout {
|
|||
|
||||
// 25.2.6 Find end
|
||||
template<typename ForwardIterator1, typename ForwardIterator2, typename BinaryPredicate>
|
||||
inline SPROUT_CONSTEXPR ForwardIterator1 find_end(
|
||||
ForwardIterator1 first1,
|
||||
ForwardIterator1 last1,
|
||||
ForwardIterator2 first2,
|
||||
ForwardIterator2 last2,
|
||||
inline SPROUT_CONSTEXPR ForwardIterator1
|
||||
find_end(
|
||||
ForwardIterator1 first1, ForwardIterator1 last1,
|
||||
ForwardIterator2 first2, ForwardIterator2 last2,
|
||||
BinaryPredicate pred
|
||||
)
|
||||
{
|
||||
|
@ -41,18 +41,15 @@ namespace sprout {
|
|||
}
|
||||
|
||||
template<typename ForwardIterator1, typename ForwardIterator2>
|
||||
inline SPROUT_CONSTEXPR ForwardIterator1 find_end(
|
||||
ForwardIterator1 first1,
|
||||
ForwardIterator1 last1,
|
||||
ForwardIterator2 first2,
|
||||
ForwardIterator2 last2
|
||||
inline SPROUT_CONSTEXPR ForwardIterator1
|
||||
find_end(
|
||||
ForwardIterator1 first1, ForwardIterator1 last1,
|
||||
ForwardIterator2 first2, ForwardIterator2 last2
|
||||
)
|
||||
{
|
||||
return sprout::find_end(
|
||||
first1,
|
||||
last1,
|
||||
first2,
|
||||
last2,
|
||||
first1, last1,
|
||||
first2, last2,
|
||||
sprout::detail::iter_equal_to<ForwardIterator1, ForwardIterator2>()
|
||||
);
|
||||
}
|
||||
|
|
|
@ -10,11 +10,10 @@ namespace sprout {
|
|||
|
||||
// 25.2.7 Find first
|
||||
template<typename ForwardIterator1, typename ForwardIterator2, typename BinaryPredicate>
|
||||
inline SPROUT_CONSTEXPR ForwardIterator1 find_first_of(
|
||||
ForwardIterator1 first1,
|
||||
ForwardIterator1 last1,
|
||||
ForwardIterator2 first2,
|
||||
ForwardIterator2 last2,
|
||||
inline SPROUT_CONSTEXPR ForwardIterator1
|
||||
find_first_of(
|
||||
ForwardIterator1 first1, ForwardIterator1 last1,
|
||||
ForwardIterator2 first2, ForwardIterator2 last2,
|
||||
BinaryPredicate pred
|
||||
)
|
||||
{
|
||||
|
@ -24,11 +23,10 @@ namespace sprout {
|
|||
}
|
||||
|
||||
template<typename ForwardIterator1, typename ForwardIterator2>
|
||||
inline SPROUT_CONSTEXPR ForwardIterator1 find_first_of(
|
||||
ForwardIterator1 first1,
|
||||
ForwardIterator1 last1,
|
||||
ForwardIterator2 first2,
|
||||
ForwardIterator2 last2
|
||||
inline SPROUT_CONSTEXPR ForwardIterator1
|
||||
find_first_of(
|
||||
ForwardIterator1 first1, ForwardIterator1 last1,
|
||||
ForwardIterator2 first2, ForwardIterator2 last2
|
||||
)
|
||||
{
|
||||
return first1 == last1 || sprout::find(first2, last2, *first1) != last2 ? first1
|
||||
|
|
|
@ -9,7 +9,8 @@ namespace sprout {
|
|||
|
||||
// 25.2.5 Find
|
||||
template<typename InputIterator, typename Predicate>
|
||||
inline SPROUT_CONSTEXPR InputIterator find_if(InputIterator first, InputIterator last, Predicate pred) {
|
||||
inline SPROUT_CONSTEXPR InputIterator
|
||||
find_if(InputIterator first, InputIterator last, Predicate pred) {
|
||||
return first == last || pred(*first) != false ? first
|
||||
: sprout::find_if(sprout::next(first), last, pred)
|
||||
;
|
||||
|
|
|
@ -9,8 +9,8 @@ namespace sprout {
|
|||
|
||||
// 25.2.5 Find
|
||||
template<typename InputIterator, typename Predicate>
|
||||
inline SPROUT_CONSTEXPR InputIterator find_if_not(InputIterator first, InputIterator last, Predicate pred)
|
||||
{
|
||||
inline SPROUT_CONSTEXPR InputIterator
|
||||
find_if_not(InputIterator first, InputIterator last, Predicate pred) {
|
||||
return first == last || pred(*first) == false ? first
|
||||
: sprout::find_if_not(sprout::next(first), last, pred)
|
||||
;
|
||||
|
|
|
@ -9,7 +9,8 @@ namespace sprout {
|
|||
|
||||
// 25.4.5.1 includes
|
||||
template<typename InputIterator1, typename InputIterator2>
|
||||
inline SPROUT_CONSTEXPR bool includes(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2) {
|
||||
inline SPROUT_CONSTEXPR bool
|
||||
includes(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2) {
|
||||
return first2 == last2 ? true
|
||||
: first1 == last1 ? false
|
||||
: !(*first1 < *first2) && !(*first2 < *first1)
|
||||
|
@ -19,7 +20,8 @@ namespace sprout {
|
|||
}
|
||||
|
||||
template<typename InputIterator1, typename InputIterator2, typename Compare>
|
||||
inline SPROUT_CONSTEXPR bool includes(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, Compare comp) {
|
||||
inline SPROUT_CONSTEXPR bool
|
||||
includes(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, Compare comp) {
|
||||
return first2 == last2 ? true
|
||||
: first1 == last1 ? false
|
||||
: !comp(*first1, *first2) && !comp(*first2, *first1)
|
||||
|
|
|
@ -9,12 +9,14 @@ namespace sprout {
|
|||
|
||||
// 25.4.6.5 is_heap
|
||||
template<typename RandomAccessIterator>
|
||||
inline SPROUT_CONSTEXPR bool is_heap(RandomAccessIterator first, RandomAccessIterator last) {
|
||||
inline SPROUT_CONSTEXPR bool
|
||||
is_heap(RandomAccessIterator first, RandomAccessIterator last) {
|
||||
return sprout::is_heap_until(first, last) == last;
|
||||
}
|
||||
|
||||
template<typename RandomAccessIterator, typename Compare>
|
||||
inline SPROUT_CONSTEXPR bool is_heap(RandomAccessIterator first, RandomAccessIterator last, Compare comp) {
|
||||
inline SPROUT_CONSTEXPR bool
|
||||
is_heap(RandomAccessIterator first, RandomAccessIterator last, Compare comp) {
|
||||
return sprout::is_heap_until(first, last, comp) == last;
|
||||
}
|
||||
} // namespace sprout
|
||||
|
|
|
@ -12,10 +12,9 @@ namespace sprout {
|
|||
|
||||
namespace detail {
|
||||
template<typename RandomAccessIterator, typename Compare>
|
||||
inline SPROUT_CONSTEXPR RandomAccessIterator is_heap_until_impl(
|
||||
RandomAccessIterator first,
|
||||
RandomAccessIterator last,
|
||||
Compare comp,
|
||||
inline SPROUT_CONSTEXPR RandomAccessIterator
|
||||
is_heap_until_impl(
|
||||
RandomAccessIterator first, RandomAccessIterator last, Compare comp,
|
||||
std::size_t n
|
||||
)
|
||||
{
|
||||
|
@ -27,13 +26,17 @@ namespace sprout {
|
|||
|
||||
// 25.4.6.5 is_heap
|
||||
template<typename RandomAccessIterator>
|
||||
inline SPROUT_CONSTEXPR RandomAccessIterator is_heap_until(RandomAccessIterator first, RandomAccessIterator last) {
|
||||
inline SPROUT_CONSTEXPR RandomAccessIterator
|
||||
is_heap_until(RandomAccessIterator first, RandomAccessIterator last) {
|
||||
return sprout::is_heap_until(first, last, NS_SSCRISK_CEL_OR_SPROUT::less<decltype(*first)>());
|
||||
}
|
||||
|
||||
template<typename RandomAccessIterator, typename Compare>
|
||||
inline SPROUT_CONSTEXPR RandomAccessIterator is_heap_until(RandomAccessIterator first, RandomAccessIterator last, Compare comp) {
|
||||
return NS_SSCRISK_CEL_OR_SPROUT::distance(first, last) < 2 ? last : sprout::detail::is_heap_until_impl(first, last, comp, 1);
|
||||
inline SPROUT_CONSTEXPR RandomAccessIterator
|
||||
is_heap_until(RandomAccessIterator first, RandomAccessIterator last, Compare comp) {
|
||||
return NS_SSCRISK_CEL_OR_SPROUT::distance(first, last) < 2 ? last
|
||||
: sprout::detail::is_heap_until_impl(first, last, comp, 1)
|
||||
;
|
||||
}
|
||||
} // namespace sprout
|
||||
|
||||
|
|
|
@ -9,7 +9,8 @@ namespace sprout {
|
|||
|
||||
namespace detail {
|
||||
template<typename InputIterator, typename Predicate>
|
||||
inline SPROUT_CONSTEXPR bool is_partitioned_impl(InputIterator first, InputIterator last, Predicate pred, bool cond = true) {
|
||||
inline SPROUT_CONSTEXPR bool
|
||||
is_partitioned_impl(InputIterator first, InputIterator last, Predicate pred, bool cond = true) {
|
||||
return first == last ? true
|
||||
: cond ? sprout::detail::is_partitioned_impl(sprout::next(first), last, pred, pred(*first))
|
||||
: pred(*first) ? false
|
||||
|
@ -20,7 +21,8 @@ namespace sprout {
|
|||
|
||||
// 25.3.13 Partitions
|
||||
template<typename InputIterator, typename Predicate>
|
||||
inline SPROUT_CONSTEXPR bool is_partitioned(InputIterator first, InputIterator last, Predicate pred) {
|
||||
inline SPROUT_CONSTEXPR bool
|
||||
is_partitioned(InputIterator first, InputIterator last, Predicate pred) {
|
||||
return sprout::detail::is_partitioned_impl(first, last, pred);
|
||||
}
|
||||
} // namespace sprout
|
||||
|
|
|
@ -13,11 +13,10 @@ namespace sprout {
|
|||
|
||||
namespace detail {
|
||||
template<typename ForwardIterator1, typename ForwardIterator2>
|
||||
inline SPROUT_CONSTEXPR bool is_permutation_impl(
|
||||
ForwardIterator1 first1,
|
||||
ForwardIterator1 last1,
|
||||
ForwardIterator2 first2,
|
||||
ForwardIterator1 first1_
|
||||
inline SPROUT_CONSTEXPR bool
|
||||
is_permutation_impl(
|
||||
ForwardIterator1 first1, ForwardIterator1 last1,
|
||||
ForwardIterator2 first2, ForwardIterator1 first1_
|
||||
)
|
||||
{
|
||||
return first1_ == last1 ? true
|
||||
|
@ -30,17 +29,19 @@ namespace sprout {
|
|||
}
|
||||
|
||||
template<typename ForwardIterator1, typename ForwardIterator2, typename BinaryPredicate>
|
||||
inline SPROUT_CONSTEXPR bool is_permutation_impl(
|
||||
ForwardIterator1 first1,
|
||||
ForwardIterator1 last1,
|
||||
ForwardIterator2 first2,
|
||||
ForwardIterator1 first1_,
|
||||
inline SPROUT_CONSTEXPR bool
|
||||
is_permutation_impl(
|
||||
ForwardIterator1 first1, ForwardIterator1 last1,
|
||||
ForwardIterator2 first2, ForwardIterator1 first1_,
|
||||
BinaryPredicate pred
|
||||
)
|
||||
{
|
||||
return first1_ == last1 ? true
|
||||
: sprout::count_if(first1, last1, NS_SSCRISK_CEL_OR_SPROUT::bind2nd(pred, *first1_))
|
||||
== sprout::count_if(first2, sprout::next(first2, NS_SSCRISK_CEL_OR_SPROUT::distance(first1, last1)), NS_SSCRISK_CEL_OR_SPROUT::bind2nd(pred, *first1_))
|
||||
== sprout::count_if(
|
||||
first2, sprout::next(first2, NS_SSCRISK_CEL_OR_SPROUT::distance(first1, last1)),
|
||||
NS_SSCRISK_CEL_OR_SPROUT::bind2nd(pred, *first1_)
|
||||
)
|
||||
&& sprout::detail::is_permutation_impl(first1, last1, first2, sprout::next(first1_), pred)
|
||||
? true
|
||||
: false
|
||||
|
@ -50,23 +51,14 @@ namespace sprout {
|
|||
|
||||
// 25.2.12 Is permutation
|
||||
template<typename ForwardIterator1, typename ForwardIterator2>
|
||||
inline SPROUT_CONSTEXPR bool is_permutation(
|
||||
ForwardIterator1 first1,
|
||||
ForwardIterator1 last1,
|
||||
ForwardIterator2 first2
|
||||
)
|
||||
{
|
||||
inline SPROUT_CONSTEXPR bool
|
||||
is_permutation(ForwardIterator1 first1, ForwardIterator1 last1, ForwardIterator2 first2) {
|
||||
return sprout::detail::is_permutation_impl(first1, last1, first2, first1);
|
||||
}
|
||||
|
||||
template<typename ForwardIterator1, typename ForwardIterator2, typename BinaryPredicate>
|
||||
inline SPROUT_CONSTEXPR bool is_permutation(
|
||||
ForwardIterator1 first1,
|
||||
ForwardIterator1 last1,
|
||||
ForwardIterator2 first2,
|
||||
BinaryPredicate pred
|
||||
)
|
||||
{
|
||||
inline SPROUT_CONSTEXPR bool
|
||||
is_permutation(ForwardIterator1 first1, ForwardIterator1 last1, ForwardIterator2 first2, BinaryPredicate pred) {
|
||||
return sprout::detail::is_permutation_impl(first1, last1, first2, first1, pred);
|
||||
}
|
||||
} // namespace sprout
|
||||
|
|
|
@ -9,12 +9,14 @@ namespace sprout {
|
|||
|
||||
// 25.4.1.5 is_sorted
|
||||
template<typename ForwardIterator>
|
||||
inline SPROUT_CONSTEXPR bool is_sorted(ForwardIterator first, ForwardIterator last) {
|
||||
inline SPROUT_CONSTEXPR bool
|
||||
is_sorted(ForwardIterator first, ForwardIterator last) {
|
||||
return sprout::is_sorted_until(first, last) == last;
|
||||
}
|
||||
|
||||
template<typename ForwardIterator, typename Compare>
|
||||
inline SPROUT_CONSTEXPR bool is_sorted(ForwardIterator first, ForwardIterator last, Compare comp) {
|
||||
inline SPROUT_CONSTEXPR bool
|
||||
is_sorted(ForwardIterator first, ForwardIterator last, Compare comp) {
|
||||
return sprout::is_sorted_until(first, last, comp) == last;
|
||||
}
|
||||
} // namespace sprout
|
||||
|
|
|
@ -9,7 +9,8 @@ namespace sprout {
|
|||
|
||||
// 25.4.1.5 is_sorted
|
||||
template<typename ForwardIterator>
|
||||
inline SPROUT_CONSTEXPR ForwardIterator is_sorted_until(ForwardIterator first, ForwardIterator last) {
|
||||
inline SPROUT_CONSTEXPR ForwardIterator
|
||||
is_sorted_until(ForwardIterator first, ForwardIterator last) {
|
||||
return first == last || sprout::next(first) == last ? last
|
||||
: *(sprout::next(first)) < *first ? sprout::next(first)
|
||||
: sprout::is_sorted_until(sprout::next(first), last)
|
||||
|
@ -17,7 +18,8 @@ namespace sprout {
|
|||
}
|
||||
|
||||
template<typename ForwardIterator, typename Compare>
|
||||
inline SPROUT_CONSTEXPR ForwardIterator is_sorted_until(ForwardIterator first, ForwardIterator last, Compare comp) {
|
||||
inline SPROUT_CONSTEXPR ForwardIterator
|
||||
is_sorted_until(ForwardIterator first, ForwardIterator last, Compare comp) {
|
||||
return first == last || sprout::next(first) == last ? last
|
||||
: comp(*(sprout::next(first)), *first) != false ? sprout::next(first)
|
||||
: sprout::is_sorted_until(sprout::next(first), last)
|
||||
|
|
|
@ -10,11 +10,10 @@ namespace sprout {
|
|||
|
||||
// 25.4.8 Lexicographical comparison
|
||||
template<typename InputIterator1, typename InputIterator2, typename Compare>
|
||||
inline SPROUT_CONSTEXPR bool lexicographical_compare(
|
||||
InputIterator1 first1,
|
||||
InputIterator1 last1,
|
||||
InputIterator2 first2,
|
||||
InputIterator2 last2,
|
||||
inline SPROUT_CONSTEXPR bool
|
||||
lexicographical_compare(
|
||||
InputIterator1 first1, InputIterator1 last1,
|
||||
InputIterator2 first2, InputIterator2 last2,
|
||||
Compare comp
|
||||
)
|
||||
{
|
||||
|
@ -26,14 +25,16 @@ namespace sprout {
|
|||
}
|
||||
|
||||
template<typename InputIterator1, typename InputIterator2>
|
||||
inline SPROUT_CONSTEXPR bool lexicographical_compare(
|
||||
InputIterator1 first1,
|
||||
InputIterator1 last1,
|
||||
InputIterator2 first2,
|
||||
InputIterator2 last2
|
||||
inline SPROUT_CONSTEXPR bool
|
||||
lexicographical_compare(
|
||||
InputIterator1 first1, InputIterator1 last1,
|
||||
InputIterator2 first2, InputIterator2 last2
|
||||
)
|
||||
{
|
||||
return sprout::lexicographical_compare(first1, last1, first2, last2, NS_SSCRISK_CEL_OR_SPROUT::less<decltype(*first1 + *first2)>());
|
||||
return sprout::lexicographical_compare(
|
||||
first1, last1, first2, last2,
|
||||
NS_SSCRISK_CEL_OR_SPROUT::less<decltype(*first1 + *first2)>()
|
||||
);
|
||||
}
|
||||
} // namespace sprout
|
||||
|
||||
|
|
|
@ -10,7 +10,8 @@ namespace sprout {
|
|||
|
||||
// 25.4.3.1 lower_bound
|
||||
template<typename ForwardIterator, typename T>
|
||||
inline SPROUT_CONSTEXPR ForwardIterator lower_bound(ForwardIterator first, ForwardIterator last, T const& value) {
|
||||
inline SPROUT_CONSTEXPR ForwardIterator
|
||||
lower_bound(ForwardIterator first, ForwardIterator last, T const& value) {
|
||||
return first == last ? last
|
||||
: sprout::next(first) == last ? *first < value ? last : first
|
||||
: *sprout::next(first, NS_SSCRISK_CEL_OR_SPROUT::distance(first, last) / 2) < value
|
||||
|
@ -20,7 +21,8 @@ namespace sprout {
|
|||
}
|
||||
|
||||
template<typename ForwardIterator, typename T, typename Compare>
|
||||
inline SPROUT_CONSTEXPR ForwardIterator lower_bound(ForwardIterator first, ForwardIterator last, T const& value, Compare comp) {
|
||||
inline SPROUT_CONSTEXPR ForwardIterator
|
||||
lower_bound(ForwardIterator first, ForwardIterator last, T const& value, Compare comp) {
|
||||
return first == last ? last
|
||||
: sprout::next(first) == last ? comp(*first, value) ? last : first
|
||||
: comp(*sprout::next(first, NS_SSCRISK_CEL_OR_SPROUT::distance(first, last) / 2), value)
|
||||
|
|
|
@ -9,12 +9,14 @@ namespace sprout {
|
|||
|
||||
// 25.4.7 Minimum and maximum
|
||||
template<typename T, typename Compare>
|
||||
inline SPROUT_CONSTEXPR T const& max(T const& a, T const& b, Compare comp) {
|
||||
inline SPROUT_CONSTEXPR T const&
|
||||
max(T const& a, T const& b, Compare comp) {
|
||||
return comp(a, b) ? b : a;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
inline SPROUT_CONSTEXPR T const& max(T const& a, T const& b) {
|
||||
inline SPROUT_CONSTEXPR T const&
|
||||
max(T const& a, T const& b) {
|
||||
return sprout::max(a, b, NS_SSCRISK_CEL_OR_SPROUT::less<T>());
|
||||
}
|
||||
} // namespace sprout
|
||||
|
|
|
@ -11,10 +11,9 @@ namespace sprout {
|
|||
|
||||
namespace detail {
|
||||
template<typename ForwardIterator, typename Compare>
|
||||
inline SPROUT_CONSTEXPR ForwardIterator max_element_impl(
|
||||
ForwardIterator first,
|
||||
ForwardIterator last,
|
||||
Compare comp,
|
||||
inline SPROUT_CONSTEXPR ForwardIterator
|
||||
max_element_impl(
|
||||
ForwardIterator first, ForwardIterator last, Compare comp,
|
||||
ForwardIterator max
|
||||
)
|
||||
{
|
||||
|
@ -26,13 +25,18 @@ namespace sprout {
|
|||
|
||||
// 25.4.7 Minimum and maximum
|
||||
template<typename ForwardIterator, typename Compare>
|
||||
inline SPROUT_CONSTEXPR ForwardIterator max_element(ForwardIterator first, ForwardIterator last, Compare comp) {
|
||||
inline SPROUT_CONSTEXPR ForwardIterator
|
||||
max_element(ForwardIterator first, ForwardIterator last, Compare comp) {
|
||||
return sprout::detail::max_element_impl(first, last, comp, first);
|
||||
}
|
||||
|
||||
template<typename ForwardIterator>
|
||||
inline SPROUT_CONSTEXPR ForwardIterator max_element(ForwardIterator first, ForwardIterator last) {
|
||||
return sprout::max_element(first, last, NS_SSCRISK_CEL_OR_SPROUT::less<typename std::iterator_traits<ForwardIterator>::value_type>());
|
||||
inline SPROUT_CONSTEXPR ForwardIterator
|
||||
max_element(ForwardIterator first, ForwardIterator last) {
|
||||
return sprout::max_element(
|
||||
first, last,
|
||||
NS_SSCRISK_CEL_OR_SPROUT::less<typename std::iterator_traits<ForwardIterator>::value_type>()
|
||||
);
|
||||
}
|
||||
} // namespace sprout
|
||||
|
||||
|
|
|
@ -9,12 +9,14 @@ namespace sprout {
|
|||
|
||||
// 25.4.7 Minimum and maximum
|
||||
template<typename T, typename Compare>
|
||||
inline SPROUT_CONSTEXPR T const& min(T const& a, T const& b, Compare comp) {
|
||||
inline SPROUT_CONSTEXPR T const&
|
||||
min(T const& a, T const& b, Compare comp) {
|
||||
return comp(b, a) ? b : a;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
inline SPROUT_CONSTEXPR T const& min(T const& a, T const& b) {
|
||||
inline SPROUT_CONSTEXPR T const&
|
||||
min(T const& a, T const& b) {
|
||||
return sprout::min(a, b, NS_SSCRISK_CEL_OR_SPROUT::less<T>());
|
||||
}
|
||||
} // namespace sprout
|
||||
|
|
|
@ -11,10 +11,9 @@ namespace sprout {
|
|||
|
||||
namespace detail {
|
||||
template<typename ForwardIterator, typename Compare>
|
||||
inline SPROUT_CONSTEXPR ForwardIterator min_element_impl(
|
||||
ForwardIterator first,
|
||||
ForwardIterator last,
|
||||
Compare comp,
|
||||
inline SPROUT_CONSTEXPR ForwardIterator
|
||||
min_element_impl(
|
||||
ForwardIterator first, ForwardIterator last, Compare comp,
|
||||
ForwardIterator min
|
||||
)
|
||||
{
|
||||
|
@ -26,13 +25,18 @@ namespace sprout {
|
|||
|
||||
// 25.4.7 Minimum and maximum
|
||||
template<typename ForwardIterator, typename Compare>
|
||||
inline SPROUT_CONSTEXPR ForwardIterator min_element(ForwardIterator first, ForwardIterator last, Compare comp) {
|
||||
inline SPROUT_CONSTEXPR ForwardIterator
|
||||
min_element(ForwardIterator first, ForwardIterator last, Compare comp) {
|
||||
return sprout::detail::min_element_impl(first, last, comp, first);
|
||||
}
|
||||
|
||||
template<typename ForwardIterator>
|
||||
inline SPROUT_CONSTEXPR ForwardIterator min_element(ForwardIterator first, ForwardIterator last) {
|
||||
return sprout::min_element(first, last, NS_SSCRISK_CEL_OR_SPROUT::less<typename std::iterator_traits<ForwardIterator>::value_type>());
|
||||
inline SPROUT_CONSTEXPR ForwardIterator
|
||||
min_element(ForwardIterator first, ForwardIterator last) {
|
||||
return sprout::min_element(
|
||||
first, last,
|
||||
NS_SSCRISK_CEL_OR_SPROUT::less<typename std::iterator_traits<ForwardIterator>::value_type>()
|
||||
);
|
||||
}
|
||||
} // namespace sprout
|
||||
|
||||
|
|
|
@ -10,12 +10,14 @@ namespace sprout {
|
|||
|
||||
// 25.4.7 Minimum and maximum
|
||||
template<typename T, typename Compare>
|
||||
inline SPROUT_CONSTEXPR sprout::pair<T, T> minmax(T const& a, T const& b, Compare comp) {
|
||||
inline SPROUT_CONSTEXPR sprout::pair<T, T>
|
||||
minmax(T const& a, T const& b, Compare comp) {
|
||||
return comp(b, a) ? sprout::pair<T, T>(b, a) : sprout::pair<T, T>(a, b);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
inline SPROUT_CONSTEXPR sprout::pair<T, T> minmax(T const& a, T const& b) {
|
||||
inline SPROUT_CONSTEXPR sprout::pair<T, T>
|
||||
minmax(T const& a, T const& b) {
|
||||
return sprout::minmax(a, b, NS_SSCRISK_CEL_OR_SPROUT::less<T>());
|
||||
}
|
||||
} // namespace sprout
|
||||
|
|
|
@ -11,12 +11,10 @@ namespace sprout {
|
|||
|
||||
namespace detail {
|
||||
template<typename ForwardIterator, typename Compare>
|
||||
inline SPROUT_CONSTEXPR sprout::pair<ForwardIterator, ForwardIterator> minmax_element_impl(
|
||||
ForwardIterator first,
|
||||
ForwardIterator last,
|
||||
Compare comp,
|
||||
ForwardIterator min,
|
||||
ForwardIterator max
|
||||
inline SPROUT_CONSTEXPR sprout::pair<ForwardIterator, ForwardIterator>
|
||||
minmax_element_impl(
|
||||
ForwardIterator first, ForwardIterator last, Compare comp,
|
||||
ForwardIterator min, ForwardIterator max
|
||||
)
|
||||
{
|
||||
return first == last ? sprout::pair<ForwardIterator, ForwardIterator>(min, max)
|
||||
|
@ -28,13 +26,18 @@ namespace sprout {
|
|||
|
||||
// 25.4.7 Minimum and maximum
|
||||
template<typename ForwardIterator, typename Compare>
|
||||
inline SPROUT_CONSTEXPR pair<ForwardIterator, ForwardIterator> minmax_element(ForwardIterator first, ForwardIterator last, Compare comp) {
|
||||
inline SPROUT_CONSTEXPR pair<ForwardIterator, ForwardIterator>
|
||||
minmax_element(ForwardIterator first, ForwardIterator last, Compare comp) {
|
||||
return sprout::detail::minmax_element_impl(first, last, comp, first, first);
|
||||
}
|
||||
|
||||
template<typename ForwardIterator>
|
||||
inline SPROUT_CONSTEXPR pair<ForwardIterator, ForwardIterator> minmax_element(ForwardIterator first, ForwardIterator last) {
|
||||
return sprout::minmax_element(first, last, NS_SSCRISK_CEL_OR_SPROUT::less<typename std::iterator_traits<ForwardIterator>::value_type>());
|
||||
inline SPROUT_CONSTEXPR pair<ForwardIterator, ForwardIterator>
|
||||
minmax_element(ForwardIterator first, ForwardIterator last) {
|
||||
return sprout::minmax_element(
|
||||
first, last,
|
||||
NS_SSCRISK_CEL_OR_SPROUT::less<typename std::iterator_traits<ForwardIterator>::value_type>()
|
||||
);
|
||||
}
|
||||
} // namespace sprout
|
||||
|
||||
|
|
|
@ -10,12 +10,8 @@ namespace sprout {
|
|||
|
||||
// 25.2.10 Mismatch
|
||||
template<typename InputIterator1, typename InputIterator2>
|
||||
inline SPROUT_CONSTEXPR sprout::pair<InputIterator1, InputIterator2> mismatch(
|
||||
InputIterator1 first1,
|
||||
InputIterator1 last1,
|
||||
InputIterator2 first2
|
||||
)
|
||||
{
|
||||
inline SPROUT_CONSTEXPR sprout::pair<InputIterator1, InputIterator2>
|
||||
mismatch(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2) {
|
||||
return first1 == last1 || !(*first1 == *first2)
|
||||
? sprout::pair<InputIterator1, InputIterator2>{first1, first2}
|
||||
: sprout::mismatch(sprout::next(first1), last1, sprout::next(first2))
|
||||
|
@ -23,13 +19,8 @@ namespace sprout {
|
|||
}
|
||||
|
||||
template<typename InputIterator1, typename InputIterator2, typename BinaryPredicate>
|
||||
inline SPROUT_CONSTEXPR sprout::pair<InputIterator1, InputIterator2> mismatch(
|
||||
InputIterator1 first1,
|
||||
InputIterator1 last1,
|
||||
InputIterator2 first2,
|
||||
BinaryPredicate pred
|
||||
)
|
||||
{
|
||||
inline SPROUT_CONSTEXPR sprout::pair<InputIterator1, InputIterator2>
|
||||
mismatch(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, BinaryPredicate pred) {
|
||||
return first1 == last1 || pred(*first1, *first2) == false
|
||||
? sprout::pair<InputIterator1, InputIterator2>{first1, first2}
|
||||
: sprout::mismatch(sprout::next(first1), last1, sprout::next(first2))
|
||||
|
|
|
@ -9,7 +9,8 @@ namespace sprout {
|
|||
|
||||
// 25.2.3 None of
|
||||
template <typename InputIterator, typename Predicate>
|
||||
inline SPROUT_CONSTEXPR bool none_of(InputIterator first, InputIterator last, Predicate pred) {
|
||||
inline SPROUT_CONSTEXPR bool
|
||||
none_of(InputIterator first, InputIterator last, Predicate pred) {
|
||||
return first == last ? true
|
||||
: pred(*first) == false && sprout::none_of(sprout::next(first), last, pred)
|
||||
;
|
||||
|
|
|
@ -10,18 +10,15 @@ namespace sprout {
|
|||
|
||||
namespace detail {
|
||||
template<typename ForwardIterator, typename Predicate>
|
||||
inline SPROUT_CONSTEXPR ForwardIterator partition_point_impl(ForwardIterator first, ForwardIterator last, Predicate pred, ForwardIterator mid) {
|
||||
inline SPROUT_CONSTEXPR ForwardIterator
|
||||
partition_point_impl(ForwardIterator first, ForwardIterator last, Predicate pred, ForwardIterator mid) {
|
||||
return mid == last ? mid
|
||||
: pred(*mid) ? sprout::detail::partition_point_impl(
|
||||
sprout::next(mid),
|
||||
last,
|
||||
pred,
|
||||
sprout::next(mid), last, pred,
|
||||
sprout::next(mid, 1 + NS_SSCRISK_CEL_OR_SPROUT::distance(sprout::next(mid), last) / 2)
|
||||
)
|
||||
: sprout::detail::partition_point_impl(
|
||||
first,
|
||||
mid,
|
||||
pred,
|
||||
first, mid, pred,
|
||||
sprout::next(first, NS_SSCRISK_CEL_OR_SPROUT::distance(first, mid) / 2)
|
||||
)
|
||||
;
|
||||
|
@ -30,8 +27,12 @@ namespace sprout {
|
|||
|
||||
// 25.3.13 Partitions
|
||||
template<typename ForwardIterator, typename Predicate>
|
||||
inline SPROUT_CONSTEXPR ForwardIterator partition_point(ForwardIterator first, ForwardIterator last, Predicate pred) {
|
||||
return sprout::detail::partition_point_impl(first, last, pred, sprout::next(first, NS_SSCRISK_CEL_OR_SPROUT::distance(first, last) / 2));
|
||||
inline SPROUT_CONSTEXPR ForwardIterator
|
||||
partition_point(ForwardIterator first, ForwardIterator last, Predicate pred) {
|
||||
return sprout::detail::partition_point_impl(
|
||||
first, last, pred,
|
||||
sprout::next(first, NS_SSCRISK_CEL_OR_SPROUT::distance(first, last) / 2)
|
||||
);
|
||||
}
|
||||
} // namespace sprout
|
||||
|
||||
|
|
|
@ -10,11 +10,10 @@ namespace sprout {
|
|||
|
||||
// 25.2.13 Search
|
||||
template<typename ForwardIterator1, typename ForwardIterator2>
|
||||
inline SPROUT_CONSTEXPR ForwardIterator1 search(
|
||||
ForwardIterator1 first1,
|
||||
ForwardIterator1 last1,
|
||||
ForwardIterator2 first2,
|
||||
ForwardIterator2 last2
|
||||
inline SPROUT_CONSTEXPR ForwardIterator1
|
||||
search(
|
||||
ForwardIterator1 first1, ForwardIterator1 last1,
|
||||
ForwardIterator2 first2, ForwardIterator2 last2
|
||||
)
|
||||
{
|
||||
return first1 == last1 || first2 == last2 ? first1
|
||||
|
@ -27,11 +26,10 @@ namespace sprout {
|
|||
}
|
||||
|
||||
template<typename ForwardIterator1, typename ForwardIterator2, typename BinaryPredicate>
|
||||
inline SPROUT_CONSTEXPR ForwardIterator1 search(
|
||||
ForwardIterator1 first1,
|
||||
ForwardIterator1 last1,
|
||||
ForwardIterator2 first2,
|
||||
ForwardIterator2 last2,
|
||||
inline SPROUT_CONSTEXPR ForwardIterator1
|
||||
search(
|
||||
ForwardIterator1 first1, ForwardIterator1 last1,
|
||||
ForwardIterator2 first2, ForwardIterator2 last2,
|
||||
BinaryPredicate pred
|
||||
)
|
||||
{
|
||||
|
|
|
@ -9,13 +9,8 @@ namespace sprout {
|
|||
|
||||
// 25.2.13 Search
|
||||
template<typename ForwardIterator, typename Size, typename T>
|
||||
inline SPROUT_CONSTEXPR ForwardIterator search_n(
|
||||
ForwardIterator first,
|
||||
ForwardIterator last,
|
||||
Size count,
|
||||
T const& value
|
||||
)
|
||||
{
|
||||
inline SPROUT_CONSTEXPR ForwardIterator
|
||||
search_n(ForwardIterator first, ForwardIterator last, Size count, T const& value) {
|
||||
return first == last || count == 0 ? first
|
||||
: sprout::next(first) == last && count > 1 ? last
|
||||
: *first == value
|
||||
|
@ -26,14 +21,8 @@ namespace sprout {
|
|||
}
|
||||
|
||||
template<typename ForwardIterator, typename Size, typename T, typename BinaryPredicate>
|
||||
inline SPROUT_CONSTEXPR ForwardIterator search_n(
|
||||
ForwardIterator first,
|
||||
ForwardIterator last,
|
||||
Size count,
|
||||
T const& value,
|
||||
BinaryPredicate pred
|
||||
)
|
||||
{
|
||||
inline SPROUT_CONSTEXPR ForwardIterator
|
||||
search_n(ForwardIterator first, ForwardIterator last, Size count, T const& value, BinaryPredicate pred) {
|
||||
return first == last || count == 0 ? first
|
||||
: sprout::next(first) == last && count > 1 ? last
|
||||
: *first == value
|
||||
|
|
|
@ -10,7 +10,8 @@ namespace sprout {
|
|||
|
||||
// 25.4.3.2 upper_bound
|
||||
template<typename ForwardIterator, typename T>
|
||||
inline SPROUT_CONSTEXPR ForwardIterator upper_bound(ForwardIterator first, ForwardIterator last, T const& value) {
|
||||
inline SPROUT_CONSTEXPR ForwardIterator
|
||||
upper_bound(ForwardIterator first, ForwardIterator last, T const& value) {
|
||||
return first == last ? last
|
||||
: sprout::next(first) == last ? !(value < *first) ? last : first
|
||||
: !(value < *sprout::next(first, NS_SSCRISK_CEL_OR_SPROUT::distance(first, last) / 2))
|
||||
|
@ -20,7 +21,8 @@ namespace sprout {
|
|||
}
|
||||
|
||||
template<typename ForwardIterator, typename T, typename Compare>
|
||||
inline SPROUT_CONSTEXPR ForwardIterator upper_bound(ForwardIterator first, ForwardIterator last, T const& value, Compare comp) {
|
||||
inline SPROUT_CONSTEXPR ForwardIterator
|
||||
upper_bound(ForwardIterator first, ForwardIterator last, T const& value, Compare comp) {
|
||||
return first == last ? last
|
||||
: sprout::next(first) == last ? !comp(value, *first) ? last : first
|
||||
: !comp(value, *sprout::next(first, NS_SSCRISK_CEL_OR_SPROUT::distance(first, last) / 2))
|
||||
|
|
|
@ -123,14 +123,11 @@ namespace sprout {
|
|||
make_simple_camera(
|
||||
Unit const& far_plane,
|
||||
typename sprout::darkroom::cameras::basic_simple_camera<Unit>::angle_of_view_reference::values reference_value
|
||||
= sprout::darkroom::cameras::basic_simple_camera<Unit>::angle_of_view_reference::long_side
|
||||
,
|
||||
= sprout::darkroom::cameras::basic_simple_camera<Unit>::angle_of_view_reference::long_side,
|
||||
typename sprout::darkroom::cameras::basic_simple_camera<Unit>::position_type const& position
|
||||
= typename sprout::darkroom::cameras::basic_simple_camera<Unit>::position_type(0, 0, -1)
|
||||
,
|
||||
= typename sprout::darkroom::cameras::basic_simple_camera<Unit>::position_type(0, 0, -1),
|
||||
typename sprout::darkroom::cameras::basic_simple_camera<Unit>::position_type const& fixation_point
|
||||
= typename sprout::darkroom::cameras::basic_simple_camera<Unit>::position_type(0, 0, 0)
|
||||
,
|
||||
= typename sprout::darkroom::cameras::basic_simple_camera<Unit>::position_type(0, 0, 0),
|
||||
Unit const& rotate = 0
|
||||
)
|
||||
{
|
||||
|
|
|
@ -155,11 +155,9 @@ namespace sprout {
|
|||
Texture const& texture, Unit const& scale,
|
||||
Unit const& offset_u = 0, Unit const& offset_v = 0,
|
||||
typename sprout::darkroom::materials::texture_map<Texture, Unit>::result_type const& default_color
|
||||
= typename sprout::darkroom::materials::texture_map<Texture, Unit>::result_typ()
|
||||
,
|
||||
= typename sprout::darkroom::materials::texture_map<Texture, Unit>::result_typ(),
|
||||
sprout::darkroom::materials::interpolation_type::values interpolation_value
|
||||
= sprout::darkroom::materials::interpolation_type::nearest_neighbor
|
||||
,
|
||||
= sprout::darkroom::materials::interpolation_type::nearest_neighbor,
|
||||
sprout::darkroom::materials::texture_map_placement::values placement_value
|
||||
= sprout::darkroom::materials::texture_map_placement::tile
|
||||
)
|
||||
|
|
|
@ -28,13 +28,11 @@ namespace sprout {
|
|||
Objects const& objs, Lights const& lights,
|
||||
typename sprout::container_traits<
|
||||
typename sprout::container_traits<Pixels>::value_type
|
||||
>::size_type x
|
||||
,
|
||||
>::size_type x,
|
||||
typename sprout::container_traits<Pixels>::size_type y,
|
||||
typename sprout::container_traits<
|
||||
typename sprout::container_traits<Pixels>::value_type
|
||||
>::size_type width
|
||||
,
|
||||
>::size_type width,
|
||||
typename sprout::container_traits<Pixels>::size_type height,
|
||||
std::size_t depth_max,
|
||||
sprout::index_tuple<XIndexes...>
|
||||
|
@ -100,21 +98,17 @@ namespace sprout {
|
|||
typename sprout::container_traits<
|
||||
typename sprout::container_traits<Pixels>::value_type
|
||||
>::size_type x
|
||||
= 0
|
||||
,
|
||||
= 0,
|
||||
typename sprout::container_traits<Pixels>::size_type y
|
||||
= 0
|
||||
,
|
||||
= 0,
|
||||
typename sprout::container_traits<
|
||||
typename sprout::container_traits<Pixels>::value_type
|
||||
>::size_type width
|
||||
= sprout::container_traits<
|
||||
typename sprout::container_traits<Pixels>::value_type
|
||||
>::static_size
|
||||
,
|
||||
>::static_size,
|
||||
typename sprout::container_traits<Pixels>::size_type height
|
||||
= sprout::container_traits<Pixels>::static_size
|
||||
,
|
||||
= sprout::container_traits<Pixels>::static_size,
|
||||
std::size_t depth_max = 8
|
||||
)
|
||||
{
|
||||
|
|
|
@ -26,7 +26,8 @@ namespace sprout {
|
|||
|
||||
// D.9.2 bind1st
|
||||
template<typename Fn, typename T>
|
||||
inline SPROUT_CONSTEXPR sprout::binder1st<Fn> bind1st(Fn const& fn, T const& x) {
|
||||
inline SPROUT_CONSTEXPR sprout::binder1st<Fn>
|
||||
bind1st(Fn const& fn, T const& x) {
|
||||
return sprout::binder1st<Fn>(fn, typename Fn::first_argument_type(x));
|
||||
}
|
||||
} // namespace sprout
|
||||
|
|
|
@ -26,7 +26,8 @@ namespace sprout {
|
|||
|
||||
// D.9.4 bind2nd
|
||||
template<typename Fn, typename T>
|
||||
inline SPROUT_CONSTEXPR sprout::binder2nd<Fn> bind2nd(Fn const& op, T const& x) {
|
||||
inline SPROUT_CONSTEXPR sprout::binder2nd<Fn>
|
||||
bind2nd(Fn const& op, T const& x) {
|
||||
return sprout::binder2nd<Fn>(op, typename Fn::second_argument_type(x));
|
||||
}
|
||||
} // namespace sprout
|
||||
|
|
|
@ -41,7 +41,8 @@ namespace sprout {
|
|||
|
||||
namespace hash_detail {
|
||||
template<typename T>
|
||||
inline SPROUT_CONSTEXPR std::size_t hash_value_signed_2(T val, int length, std::size_t seed, T positive, std::size_t i) {
|
||||
inline SPROUT_CONSTEXPR std::size_t
|
||||
hash_value_signed_2(T val, int length, std::size_t seed, T positive, std::size_t i) {
|
||||
return i > 0
|
||||
? hash_value_signed_2(
|
||||
val,
|
||||
|
@ -54,11 +55,13 @@ namespace sprout {
|
|||
;
|
||||
}
|
||||
template<typename T>
|
||||
inline SPROUT_CONSTEXPR std::size_t hash_value_signed_1(T val, int length, std::size_t seed, T positive) {
|
||||
inline SPROUT_CONSTEXPR std::size_t
|
||||
hash_value_signed_1(T val, int length, std::size_t seed, T positive) {
|
||||
return hash_value_signed_2(val, length, seed, positive, length * std::numeric_limits<std::size_t>::digits);
|
||||
}
|
||||
template<typename T>
|
||||
inline SPROUT_CONSTEXPR std::size_t hash_value_signed(T val) {
|
||||
inline SPROUT_CONSTEXPR std::size_t
|
||||
hash_value_signed(T val) {
|
||||
return sprout::hash_detail::hash_value_signed_1(
|
||||
val,
|
||||
(std::numeric_limits<T>::digits - 1) / std::numeric_limits<std::size_t>::digits,
|
||||
|
@ -68,7 +71,8 @@ namespace sprout {
|
|||
}
|
||||
|
||||
template<typename T>
|
||||
inline SPROUT_CONSTEXPR std::size_t hash_value_unsigned_2(T val, int length, std::size_t seed, std::size_t i) {
|
||||
inline SPROUT_CONSTEXPR std::size_t
|
||||
hash_value_unsigned_2(T val, int length, std::size_t seed, std::size_t i) {
|
||||
return i > 0
|
||||
? hash_value_unsigned_2(
|
||||
val,
|
||||
|
@ -80,11 +84,13 @@ namespace sprout {
|
|||
;
|
||||
}
|
||||
template<typename T>
|
||||
inline SPROUT_CONSTEXPR std::size_t hash_value_unsigned_1(T val, int length, std::size_t seed) {
|
||||
inline SPROUT_CONSTEXPR std::size_t
|
||||
hash_value_unsigned_1(T val, int length, std::size_t seed) {
|
||||
return hash_value_unsigned_2(val, length, seed, length * std::numeric_limits<std::size_t>::digits);
|
||||
}
|
||||
template<typename T>
|
||||
inline SPROUT_CONSTEXPR std::size_t hash_value_unsigned(T val) {
|
||||
inline SPROUT_CONSTEXPR std::size_t
|
||||
hash_value_unsigned(T val) {
|
||||
return sprout::hash_detail::hash_value_unsigned_1(
|
||||
val,
|
||||
(std::numeric_limits<T>::digits - 1) / std::numeric_limits<std::size_t>::digits,
|
||||
|
@ -92,11 +98,13 @@ namespace sprout {
|
|||
);
|
||||
}
|
||||
|
||||
inline std::size_t hash_value_pointer_1(std::size_t x) {
|
||||
inline std::size_t
|
||||
hash_value_pointer_1(std::size_t x) {
|
||||
return x + (x >> 3);
|
||||
}
|
||||
template<typename T>
|
||||
std::size_t hash_value_pointer(T const* v) {
|
||||
std::size_t
|
||||
hash_value_pointer(T const* v) {
|
||||
return sprout::hash_detail::hash_value_pointer_1(static_cast<std::size_t>(reinterpret_cast<std::ptrdiff_t>(v)));
|
||||
}
|
||||
} // namespace hash_detail
|
||||
|
@ -104,60 +112,77 @@ namespace sprout {
|
|||
//
|
||||
// hash_value
|
||||
//
|
||||
inline SPROUT_CONSTEXPR std::size_t hash_value(bool v) {
|
||||
inline SPROUT_CONSTEXPR std::size_t
|
||||
hash_value(bool v) {
|
||||
return static_cast<std::size_t>(v);
|
||||
}
|
||||
inline SPROUT_CONSTEXPR std::size_t hash_value(char v) {
|
||||
inline SPROUT_CONSTEXPR std::size_t
|
||||
hash_value(char v) {
|
||||
return static_cast<std::size_t>(v);
|
||||
}
|
||||
inline SPROUT_CONSTEXPR std::size_t hash_value(unsigned char v) {
|
||||
inline SPROUT_CONSTEXPR std::size_t
|
||||
hash_value(unsigned char v) {
|
||||
return static_cast<std::size_t>(v);
|
||||
}
|
||||
inline SPROUT_CONSTEXPR std::size_t hash_value(signed char v) {
|
||||
inline SPROUT_CONSTEXPR std::size_t
|
||||
hash_value(signed char v) {
|
||||
return static_cast<std::size_t>(v);
|
||||
}
|
||||
inline SPROUT_CONSTEXPR std::size_t hash_value(char16_t v) {
|
||||
inline SPROUT_CONSTEXPR std::size_t
|
||||
hash_value(char16_t v) {
|
||||
return static_cast<std::size_t>(v);
|
||||
}
|
||||
inline SPROUT_CONSTEXPR std::size_t hash_value(char32_t v) {
|
||||
inline SPROUT_CONSTEXPR std::size_t
|
||||
hash_value(char32_t v) {
|
||||
return static_cast<std::size_t>(v);
|
||||
}
|
||||
inline SPROUT_CONSTEXPR std::size_t hash_value(wchar_t v) {
|
||||
inline SPROUT_CONSTEXPR std::size_t
|
||||
hash_value(wchar_t v) {
|
||||
return static_cast<std::size_t>(v);
|
||||
}
|
||||
inline SPROUT_CONSTEXPR std::size_t hash_value(short v) {
|
||||
inline SPROUT_CONSTEXPR std::size_t
|
||||
hash_value(short v) {
|
||||
return static_cast<std::size_t>(v);
|
||||
}
|
||||
inline SPROUT_CONSTEXPR std::size_t hash_value(unsigned short v) {
|
||||
inline SPROUT_CONSTEXPR std::size_t
|
||||
hash_value(unsigned short v) {
|
||||
return static_cast<std::size_t>(v);
|
||||
}
|
||||
inline SPROUT_CONSTEXPR std::size_t hash_value(int v) {
|
||||
inline SPROUT_CONSTEXPR std::size_t
|
||||
hash_value(int v) {
|
||||
return static_cast<std::size_t>(v);
|
||||
}
|
||||
inline SPROUT_CONSTEXPR std::size_t hash_value(unsigned int v) {
|
||||
inline SPROUT_CONSTEXPR std::size_t
|
||||
hash_value(unsigned int v) {
|
||||
return static_cast<std::size_t>(v);
|
||||
}
|
||||
inline SPROUT_CONSTEXPR std::size_t hash_value(long v) {
|
||||
inline SPROUT_CONSTEXPR std::size_t
|
||||
hash_value(long v) {
|
||||
return static_cast<std::size_t>(v);
|
||||
}
|
||||
inline SPROUT_CONSTEXPR std::size_t hash_value(unsigned long v) {
|
||||
inline SPROUT_CONSTEXPR std::size_t
|
||||
hash_value(unsigned long v) {
|
||||
return static_cast<std::size_t>(v);
|
||||
}
|
||||
inline SPROUT_CONSTEXPR std::size_t hash_value(long long v) {
|
||||
inline SPROUT_CONSTEXPR std::size_t
|
||||
hash_value(long long v) {
|
||||
return sprout::hash_detail::hash_value_signed(v);
|
||||
}
|
||||
inline SPROUT_CONSTEXPR std::size_t hash_value(unsigned long long v) {
|
||||
inline SPROUT_CONSTEXPR std::size_t
|
||||
hash_value(unsigned long long v) {
|
||||
return sprout::hash_detail::hash_value_unsigned(v);
|
||||
}
|
||||
template<
|
||||
typename T,
|
||||
typename sprout::enabler_if<std::is_pointer<typename std::remove_reference<T>::type>::value>::type = sprout::enabler
|
||||
>
|
||||
inline SPROUT_CONSTEXPR std::size_t hash_value(T&& v) {
|
||||
inline SPROUT_CONSTEXPR std::size_t
|
||||
hash_value(T&& v) {
|
||||
return sprout::hash_detail::hash_value_pointer(v);
|
||||
}
|
||||
template<typename T, std::size_t N>
|
||||
inline SPROUT_CONSTEXPR std::size_t hash_value(T const (&v)[N]) {
|
||||
inline SPROUT_CONSTEXPR std::size_t
|
||||
hash_value(T const (&v)[N]) {
|
||||
return sprout::hash_range(&v[0], &v[0] + N);
|
||||
}
|
||||
|
||||
|
@ -165,7 +190,8 @@ namespace sprout {
|
|||
// to_hash
|
||||
//
|
||||
template<typename T>
|
||||
inline SPROUT_CONSTEXPR std::size_t to_hash(T const& v) {
|
||||
inline SPROUT_CONSTEXPR std::size_t
|
||||
to_hash(T const& v) {
|
||||
using sprout::hash_value;
|
||||
return hash_value(v);
|
||||
}
|
||||
|
@ -174,7 +200,8 @@ namespace sprout {
|
|||
// hash_combine
|
||||
//
|
||||
template<typename T>
|
||||
inline SPROUT_CONSTEXPR std::size_t hash_combine(std::size_t seed, T const& v) {
|
||||
inline SPROUT_CONSTEXPR std::size_t
|
||||
hash_combine(std::size_t seed, T const& v) {
|
||||
return seed ^ (sprout::to_hash(v) + 0x9e3779b9 + (seed << 6) + (seed >> 2));
|
||||
}
|
||||
|
||||
|
@ -182,24 +209,28 @@ namespace sprout {
|
|||
// hash_range
|
||||
//
|
||||
template<typename Iterator>
|
||||
inline SPROUT_CONSTEXPR std::size_t hash_range(std::size_t seed, Iterator first, Iterator last) {
|
||||
inline SPROUT_CONSTEXPR std::size_t
|
||||
hash_range(std::size_t seed, Iterator first, Iterator last) {
|
||||
return first != last
|
||||
? sprout::hash_range(sprout::hash_combine(seed, *first), sprout::next(first), last)
|
||||
: seed
|
||||
;
|
||||
}
|
||||
template<typename Iterator>
|
||||
inline SPROUT_CONSTEXPR std::size_t hash_range(Iterator first, Iterator last) {
|
||||
inline SPROUT_CONSTEXPR std::size_t
|
||||
hash_range(Iterator first, Iterator last) {
|
||||
return sprout::hash_range(0, first, last);
|
||||
}
|
||||
|
||||
namespace detail {
|
||||
template<typename T>
|
||||
inline SPROUT_CONSTEXPR std::size_t hash_values_combine_impl(std::size_t seed, T const& v) {
|
||||
inline SPROUT_CONSTEXPR std::size_t
|
||||
hash_values_combine_impl(std::size_t seed, T const& v) {
|
||||
return sprout::hash_combine(seed, v);
|
||||
}
|
||||
template<typename Head, typename... Tail>
|
||||
inline SPROUT_CONSTEXPR std::size_t hash_values_combine_impl(std::size_t seed, Head const& head, Tail const&... tail) {
|
||||
inline SPROUT_CONSTEXPR std::size_t
|
||||
hash_values_combine_impl(std::size_t seed, Head const& head, Tail const&... tail) {
|
||||
return sprout::detail::hash_values_combine_impl(sprout::hash_combine(seed, head), tail...);
|
||||
}
|
||||
} // namespace detail
|
||||
|
@ -208,7 +239,8 @@ namespace sprout {
|
|||
// hash_values_combine
|
||||
//
|
||||
template<typename... Args>
|
||||
inline SPROUT_CONSTEXPR std::size_t hash_values_combine(std::size_t seed, Args const&... args) {
|
||||
inline SPROUT_CONSTEXPR std::size_t
|
||||
hash_values_combine(std::size_t seed, Args const&... args) {
|
||||
return sprout::detail::hash_values_combine_impl(seed, args...);
|
||||
}
|
||||
|
||||
|
@ -216,7 +248,8 @@ namespace sprout {
|
|||
// hash_values
|
||||
//
|
||||
template<typename... Args>
|
||||
inline SPROUT_CONSTEXPR std::size_t hash_values(Args const&... args) {
|
||||
inline SPROUT_CONSTEXPR std::size_t
|
||||
hash_values(Args const&... args) {
|
||||
return sprout::hash_values_combine(0, args...);
|
||||
}
|
||||
|
||||
|
|
|
@ -7,8 +7,12 @@
|
|||
#include <sscrisk/cel/array.hpp>
|
||||
|
||||
namespace sprout {
|
||||
//
|
||||
// hash_value
|
||||
//
|
||||
template<typename T, std::size_t N>
|
||||
inline SPROUT_CONSTEXPR std::size_t hash_value(sscrisk::cel::array<T, N> const& v) {
|
||||
inline SPROUT_CONSTEXPR std::size_t
|
||||
hash_value(sscrisk::cel::array<T, N> const& v) {
|
||||
return sprout::hash_range(v.begin(), v.end());
|
||||
}
|
||||
} // namespace sprout
|
||||
|
|
|
@ -7,8 +7,12 @@
|
|||
#include <sscrisk/cel/utility.hpp>
|
||||
|
||||
namespace sprout {
|
||||
//
|
||||
// hash_value
|
||||
//
|
||||
template<typename T1, typename T2>
|
||||
inline SPROUT_CONSTEXPR std::size_t hash_value(sscrisk::cel::pair<T1, T2> const& v) {
|
||||
inline SPROUT_CONSTEXPR std::size_t
|
||||
hash_value(sscrisk::cel::pair<T1, T2> const& v) {
|
||||
return sprout::hash_combine(sprout::hash_combine(0, v.first), v.second);
|
||||
}
|
||||
} // namespace sprout
|
||||
|
|
|
@ -261,7 +261,8 @@ namespace sprout {
|
|||
// mem_fn
|
||||
//
|
||||
template<typename T, typename Class>
|
||||
inline SPROUT_CONSTEXPR sprout::mem_fn_adaptor<T Class::*> mem_fn(T Class::* pm) {
|
||||
inline SPROUT_CONSTEXPR sprout::mem_fn_adaptor<T Class::*>
|
||||
mem_fn(T Class::* pm) {
|
||||
return sprout::mem_fn_adaptor<T Class::*>(pm);
|
||||
}
|
||||
} // namespace sprout
|
||||
|
|
|
@ -68,22 +68,26 @@ namespace sprout {
|
|||
};
|
||||
|
||||
template<typename Ret, typename T>
|
||||
inline SPROUT_CONSTEXPR sprout::mem_fun_t<Ret, T> mem_fun(Ret (T::*f)()) {
|
||||
inline SPROUT_CONSTEXPR sprout::mem_fun_t<Ret, T>
|
||||
mem_fun(Ret (T::*f)()) {
|
||||
return sprout::mem_fun_t<Ret, T>(f);
|
||||
}
|
||||
|
||||
template<typename Ret, typename T>
|
||||
inline SPROUT_CONSTEXPR sprout::const_mem_fun_t<Ret, T> mem_fun(Ret (T::*f)() const) {
|
||||
inline SPROUT_CONSTEXPR sprout::const_mem_fun_t<Ret, T>
|
||||
mem_fun(Ret (T::*f)() const) {
|
||||
return sprout::const_mem_fun_t<Ret, T>(f);
|
||||
}
|
||||
|
||||
template<typename Ret, typename T, typename Arg>
|
||||
inline SPROUT_CONSTEXPR sprout::mem_fun1_t<Ret, T, Arg> mem_fun(Ret (T::*f)(Arg)) {
|
||||
inline SPROUT_CONSTEXPR sprout::mem_fun1_t<Ret, T, Arg>
|
||||
mem_fun(Ret (T::*f)(Arg)) {
|
||||
return sprout::mem_fun1_t<Ret, T, Arg>(f);
|
||||
}
|
||||
|
||||
template<typename Ret, typename T, typename Arg>
|
||||
inline SPROUT_CONSTEXPR sprout::const_mem_fun1_t<Ret, T, Arg> mem_fun(Ret (T::*f)(Arg) const) {
|
||||
inline SPROUT_CONSTEXPR sprout::const_mem_fun1_t<Ret, T, Arg>
|
||||
mem_fun(Ret (T::*f)(Arg) const) {
|
||||
return sprout::const_mem_fun1_t<Ret, T, Arg>(f);
|
||||
}
|
||||
} // namespace sprout
|
||||
|
|
|
@ -68,22 +68,26 @@ namespace sprout {
|
|||
};
|
||||
|
||||
template<typename Ret, typename T>
|
||||
inline SPROUT_CONSTEXPR sprout::mem_fun_ref_t<Ret, T> mem_fun_ref(Ret (T::*f)()) {
|
||||
inline SPROUT_CONSTEXPR sprout::mem_fun_ref_t<Ret, T>
|
||||
mem_fun_ref(Ret (T::*f)()) {
|
||||
return sprout::mem_fun_ref_t<Ret, T>(f);
|
||||
}
|
||||
|
||||
template<typename Ret, typename T>
|
||||
inline SPROUT_CONSTEXPR sprout::const_mem_fun_ref_t<Ret, T> mem_fun_ref(Ret (T::*f)() const) {
|
||||
inline SPROUT_CONSTEXPR sprout::const_mem_fun_ref_t<Ret, T>
|
||||
mem_fun_ref(Ret (T::*f)() const) {
|
||||
return sprout::const_mem_fun_ref_t<Ret, T>(f);
|
||||
}
|
||||
|
||||
template<typename Ret, typename T, typename Arg>
|
||||
inline SPROUT_CONSTEXPR sprout::mem_fun1_ref_t<Ret, T, Arg> mem_fun_ref(Ret (T::*f)(Arg)) {
|
||||
inline SPROUT_CONSTEXPR sprout::mem_fun1_ref_t<Ret, T, Arg>
|
||||
mem_fun_ref(Ret (T::*f)(Arg)) {
|
||||
return sprout::mem_fun1_ref_t<Ret, T, Arg>(f);
|
||||
}
|
||||
|
||||
template<typename Ret, typename T, typename Arg>
|
||||
inline SPROUT_CONSTEXPR sprout::const_mem_fun1_ref_t<Ret, T, Arg> mem_fun_ref(Ret (T::*f)(Arg) const) {
|
||||
inline SPROUT_CONSTEXPR sprout::const_mem_fun1_ref_t<Ret, T, Arg>
|
||||
mem_fun_ref(Ret (T::*f)(Arg) const) {
|
||||
return sprout::const_mem_fun1_ref_t<Ret, T, Arg>(f);
|
||||
}
|
||||
} // namespace sprout
|
||||
|
|
|
@ -23,7 +23,8 @@ namespace sprout {
|
|||
};
|
||||
|
||||
template<typename Predicate>
|
||||
inline SPROUT_CONSTEXPR sprout::unary_negate<Predicate> not1(Predicate const& pred) {
|
||||
inline SPROUT_CONSTEXPR sprout::unary_negate<Predicate>
|
||||
not1(Predicate const& pred) {
|
||||
return sprout::unary_negate<Predicate>(pred);
|
||||
}
|
||||
} // namespace sprout
|
||||
|
|
|
@ -24,7 +24,8 @@ namespace sprout {
|
|||
};
|
||||
|
||||
template<typename Predicate>
|
||||
inline SPROUT_CONSTEXPR sprout::binary_negate<Predicate> not2(Predicate const& pred) {
|
||||
inline SPROUT_CONSTEXPR sprout::binary_negate<Predicate>
|
||||
not2(Predicate const& pred) {
|
||||
return sprout::binary_negate<Predicate>(pred);
|
||||
}
|
||||
} // namespace sprout
|
||||
|
|
|
@ -24,7 +24,8 @@ namespace sprout {
|
|||
};
|
||||
|
||||
template<typename Arg, typename Result>
|
||||
inline SPROUT_CONSTEXPR sprout::pointer_to_unary_function<Arg, Result> ptr_fun(Result (*x)(Arg)) {
|
||||
inline SPROUT_CONSTEXPR sprout::pointer_to_unary_function<Arg, Result>
|
||||
ptr_fun(Result (*x)(Arg)) {
|
||||
return sprout::pointer_to_unary_function<Arg, Result>(x);
|
||||
}
|
||||
|
||||
|
@ -45,7 +46,8 @@ namespace sprout {
|
|||
};
|
||||
|
||||
template<typename Arg1, typename Arg2, typename Result>
|
||||
inline SPROUT_CONSTEXPR sprout::pointer_to_binary_function<Arg1, Arg2, Result> ptr_fun(Result (*x)(Arg1, Arg2)) {
|
||||
inline SPROUT_CONSTEXPR sprout::pointer_to_binary_function<Arg1, Arg2, Result>
|
||||
ptr_fun(Result (*x)(Arg1, Arg2)) {
|
||||
return sprout::pointer_to_binary_function<Arg1, Arg2, Result>(x);
|
||||
}
|
||||
} // namespace sprout
|
||||
|
|
|
@ -168,11 +168,13 @@ namespace sprout {
|
|||
// cref
|
||||
//
|
||||
template<typename T>
|
||||
inline SPROUT_CONSTEXPR sprout::reference_wrapper<T> ref(T& t) SPROUT_NOEXCEPT {
|
||||
inline SPROUT_CONSTEXPR sprout::reference_wrapper<T>
|
||||
ref(T& t) SPROUT_NOEXCEPT {
|
||||
return sprout::reference_wrapper<T>(t);
|
||||
}
|
||||
template<typename T>
|
||||
inline SPROUT_CONSTEXPR sprout::reference_wrapper<T const> cref(T const& t) SPROUT_NOEXCEPT {
|
||||
inline SPROUT_CONSTEXPR sprout::reference_wrapper<T const>
|
||||
cref(T const& t) SPROUT_NOEXCEPT {
|
||||
return sprout::reference_wrapper<T const>(t);
|
||||
}
|
||||
template<typename T>
|
||||
|
@ -180,11 +182,13 @@ namespace sprout {
|
|||
template<typename T>
|
||||
void cref(T const&&) = delete;
|
||||
template<typename T>
|
||||
inline SPROUT_CONSTEXPR sprout::reference_wrapper<T> ref(sprout::reference_wrapper<T> t) SPROUT_NOEXCEPT {
|
||||
inline SPROUT_CONSTEXPR sprout::reference_wrapper<T>
|
||||
ref(sprout::reference_wrapper<T> t) SPROUT_NOEXCEPT {
|
||||
return t;
|
||||
}
|
||||
template<typename T>
|
||||
inline SPROUT_CONSTEXPR sprout::reference_wrapper<T const> cref(sprout::reference_wrapper<T> t) SPROUT_NOEXCEPT {
|
||||
inline SPROUT_CONSTEXPR sprout::reference_wrapper<T const>
|
||||
ref(sprout::reference_wrapper<T> t) SPROUT_NOEXCEPT {
|
||||
return sprout::reference_wrapper<T const>(t.get());
|
||||
}
|
||||
|
||||
|
@ -268,11 +272,13 @@ namespace sprout {
|
|||
// unwrap_ref
|
||||
//
|
||||
template<typename T>
|
||||
inline typename sprout::unwrap_reference<T>::type& unwrap_ref(T& t) {
|
||||
inline typename sprout::unwrap_reference<T>::type&
|
||||
unwrap_ref(T& t) {
|
||||
return t;
|
||||
}
|
||||
template<typename T>
|
||||
inline SPROUT_CONSTEXPR typename sprout::unwrap_reference<T const>::type& unwrap_ref(T const& t) {
|
||||
inline SPROUT_CONSTEXPR typename sprout::unwrap_reference<T const>::type&
|
||||
unwrap_ref(T const& t) {
|
||||
return t;
|
||||
}
|
||||
|
||||
|
@ -280,7 +286,8 @@ namespace sprout {
|
|||
// get_pointer
|
||||
//
|
||||
template<typename T>
|
||||
inline SPROUT_CONSTEXPR T* get_pointer(sprout::reference_wrapper<T> const& r) {
|
||||
inline SPROUT_CONSTEXPR T*
|
||||
get_pointer(sprout::reference_wrapper<T> const& r) {
|
||||
return r.get_pointer();
|
||||
}
|
||||
} // namespace sprout
|
||||
|
|
|
@ -162,20 +162,18 @@ namespace sprout {
|
|||
// width
|
||||
// fill
|
||||
//
|
||||
namespace {
|
||||
inline SPROUT_CONSTEXPR sprout::io::flags::precision_t
|
||||
precision(sprout::io::flags::precision_t::type value) {
|
||||
return sprout::io::flags::precision_t(value);
|
||||
}
|
||||
inline SPROUT_CONSTEXPR sprout::io::flags::width_t
|
||||
width(sprout::io::flags::width_t::type value) {
|
||||
return sprout::io::flags::width_t(value);
|
||||
}
|
||||
inline SPROUT_CONSTEXPR sprout::io::flags::fill_t
|
||||
fill(sprout::io::flags::fill_t::type value) {
|
||||
return sprout::io::flags::fill_t(value);
|
||||
}
|
||||
} // anonymous-namespace
|
||||
inline SPROUT_CONSTEXPR sprout::io::flags::precision_t
|
||||
precision(sprout::io::flags::precision_t::type value) {
|
||||
return sprout::io::flags::precision_t(value);
|
||||
}
|
||||
inline SPROUT_CONSTEXPR sprout::io::flags::width_t
|
||||
width(sprout::io::flags::width_t::type value) {
|
||||
return sprout::io::flags::width_t(value);
|
||||
}
|
||||
inline SPROUT_CONSTEXPR sprout::io::flags::fill_t
|
||||
fill(sprout::io::flags::fill_t::type value) {
|
||||
return sprout::io::flags::fill_t(value);
|
||||
}
|
||||
|
||||
//
|
||||
// format_settings
|
||||
|
|
|
@ -10,15 +10,20 @@ namespace sprout {
|
|||
|
||||
// 26.7.2 Accumulate
|
||||
template<typename InputIterator, typename T, typename BinaryOperation>
|
||||
inline SPROUT_CONSTEXPR T accumulate(InputIterator first, InputIterator last, T init, BinaryOperation binary_op) {
|
||||
inline SPROUT_CONSTEXPR T
|
||||
accumulate(InputIterator first, InputIterator last, T init, BinaryOperation binary_op) {
|
||||
return first == last ? init
|
||||
: sprout::accumulate(sprout::next(first), last, binary_op(init, *first), binary_op)
|
||||
;
|
||||
}
|
||||
|
||||
template<typename InputIterator, typename T>
|
||||
inline SPROUT_CONSTEXPR T accumulate(InputIterator first, InputIterator last, T init) {
|
||||
return sprout::accumulate(first, last, init, NS_SSCRISK_CEL_OR_SPROUT::plus<typename std::iterator_traits<InputIterator>::value_type>());
|
||||
inline SPROUT_CONSTEXPR T
|
||||
accumulate(InputIterator first, InputIterator last, T init) {
|
||||
return sprout::accumulate(
|
||||
first, last, init,
|
||||
NS_SSCRISK_CEL_OR_SPROUT::plus<typename std::iterator_traits<InputIterator>::value_type>()
|
||||
);
|
||||
}
|
||||
} // namespace sprout
|
||||
|
||||
|
|
|
@ -11,13 +11,15 @@
|
|||
namespace sprout {
|
||||
namespace detail {
|
||||
template<typename InputIterator>
|
||||
inline SPROUT_CONSTEXPR typename std::iterator_traits<InputIterator>::value_type dft_element_gen(
|
||||
InputIterator first,
|
||||
InputIterator last,
|
||||
inline SPROUT_CONSTEXPR typename std::iterator_traits<InputIterator>::value_type
|
||||
dft_element_gen(
|
||||
InputIterator first, InputIterator last,
|
||||
typename std::iterator_traits<InputIterator>::value_type::value_type arg,
|
||||
typename std::iterator_traits<InputIterator>::difference_type k = 0,
|
||||
typename std::iterator_traits<InputIterator>::value_type value = typename std::iterator_traits<InputIterator>::value_type(),
|
||||
typename std::iterator_traits<InputIterator>::value_type::value_type theta = typename std::iterator_traits<InputIterator>::value_type::value_type()
|
||||
typename std::iterator_traits<InputIterator>::value_type value
|
||||
= typename std::iterator_traits<InputIterator>::value_type(),
|
||||
typename std::iterator_traits<InputIterator>::value_type::value_type theta
|
||||
= typename std::iterator_traits<InputIterator>::value_type::value_type()
|
||||
)
|
||||
{
|
||||
typedef typename std::iterator_traits<InputIterator>::value_type value_type;
|
||||
|
|
|
@ -10,10 +10,9 @@
|
|||
namespace sprout {
|
||||
namespace detail {
|
||||
template<typename InputIterator, typename Size>
|
||||
inline SPROUT_CONSTEXPR typename std::iterator_traits<InputIterator>::value_type dft_element_impl(
|
||||
InputIterator first,
|
||||
InputIterator last,
|
||||
typename std::iterator_traits<InputIterator>::difference_type i,
|
||||
inline SPROUT_CONSTEXPR typename std::iterator_traits<InputIterator>::value_type
|
||||
dft_element_impl(
|
||||
InputIterator first, InputIterator last, typename std::iterator_traits<InputIterator>::difference_type i,
|
||||
Size size
|
||||
)
|
||||
{
|
||||
|
@ -30,16 +29,10 @@ namespace sprout {
|
|||
// dft_element
|
||||
//
|
||||
template<typename InputIterator>
|
||||
inline SPROUT_CONSTEXPR typename std::iterator_traits<InputIterator>::value_type dft_element(
|
||||
InputIterator first,
|
||||
InputIterator last,
|
||||
typename std::iterator_traits<InputIterator>::difference_type i
|
||||
)
|
||||
{
|
||||
inline SPROUT_CONSTEXPR typename std::iterator_traits<InputIterator>::value_type
|
||||
dft_element(InputIterator first, InputIterator last, typename std::iterator_traits<InputIterator>::difference_type i) {
|
||||
return sprout::detail::dft_element_impl(
|
||||
first,
|
||||
last,
|
||||
i,
|
||||
first, last, i,
|
||||
NS_SSCRISK_CEL_OR_SPROUT::distance(first, last)
|
||||
);
|
||||
}
|
||||
|
|
|
@ -14,10 +14,9 @@ namespace sprout {
|
|||
namespace fit {
|
||||
namespace detail {
|
||||
template<typename InputIterator, typename Result>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::algorithm<Result>::type amplitude_spectrum_impl(
|
||||
InputIterator first,
|
||||
InputIterator last,
|
||||
Result const& result,
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::algorithm<Result>::type
|
||||
amplitude_spectrum_impl(
|
||||
InputIterator first, InputIterator last, Result const& result,
|
||||
typename sprout::container_traits<Result>::difference_type offset
|
||||
)
|
||||
{
|
||||
|
@ -32,12 +31,8 @@ namespace sprout {
|
|||
// amplitude_spectrum
|
||||
//
|
||||
template<typename InputIterator, typename Result>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::algorithm<Result>::type amplitude_spectrum(
|
||||
InputIterator first,
|
||||
InputIterator last,
|
||||
Result const& result
|
||||
)
|
||||
{
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::algorithm<Result>::type
|
||||
amplitude_spectrum(InputIterator first, InputIterator last, Result const& result) {
|
||||
return sprout::fit::detail::amplitude_spectrum_impl(first, last, result, sprout::internal_begin_offset(result));
|
||||
}
|
||||
} // namespace fit
|
||||
|
|
|
@ -14,10 +14,9 @@ namespace sprout {
|
|||
namespace fit {
|
||||
namespace detail {
|
||||
template<typename InputIterator, typename Result>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::algorithm<Result>::type dft_impl(
|
||||
InputIterator first,
|
||||
InputIterator last,
|
||||
Result const& result,
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::algorithm<Result>::type
|
||||
dft_impl(
|
||||
InputIterator first, InputIterator last, Result const& result,
|
||||
typename sprout::container_traits<Result>::difference_type offset
|
||||
)
|
||||
{
|
||||
|
@ -32,12 +31,8 @@ namespace sprout {
|
|||
// dft
|
||||
//
|
||||
template<typename InputIterator, typename Result>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::algorithm<Result>::type dft(
|
||||
InputIterator first,
|
||||
InputIterator last,
|
||||
Result const& result
|
||||
)
|
||||
{
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::algorithm<Result>::type
|
||||
dft(InputIterator first, InputIterator last, Result const& result) {
|
||||
return sprout::fit::detail::dft_impl(first, last, result, sprout::internal_begin_offset(result));
|
||||
}
|
||||
} // namespace fit
|
||||
|
|
|
@ -14,10 +14,9 @@ namespace sprout {
|
|||
namespace fit {
|
||||
namespace detail {
|
||||
template<typename InputIterator, typename Result>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::algorithm<Result>::type idft_impl(
|
||||
InputIterator first,
|
||||
InputIterator last,
|
||||
Result const& result,
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::algorithm<Result>::type
|
||||
idft_impl(
|
||||
InputIterator first, InputIterator last, Result const& result,
|
||||
typename sprout::container_traits<Result>::difference_type offset
|
||||
)
|
||||
{
|
||||
|
@ -32,12 +31,8 @@ namespace sprout {
|
|||
// idft
|
||||
//
|
||||
template<typename InputIterator, typename Result>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::algorithm<Result>::type idft(
|
||||
InputIterator first,
|
||||
InputIterator last,
|
||||
Result const& result
|
||||
)
|
||||
{
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::algorithm<Result>::type
|
||||
idft(InputIterator first, InputIterator last, Result const& result) {
|
||||
return sprout::fit::detail::idft_impl(first, last, result, sprout::internal_begin_offset(result));
|
||||
}
|
||||
} // namespace fit
|
||||
|
|
|
@ -14,10 +14,9 @@ namespace sprout {
|
|||
namespace fit {
|
||||
namespace detail {
|
||||
template<typename InputIterator, typename Result>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::algorithm<Result>::type phase_spectrum_impl(
|
||||
InputIterator first,
|
||||
InputIterator last,
|
||||
Result const& result,
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::algorithm<Result>::type
|
||||
phase_spectrum_impl(
|
||||
InputIterator first, InputIterator last, Result const& result,
|
||||
typename sprout::container_traits<Result>::difference_type offset
|
||||
)
|
||||
{
|
||||
|
@ -32,12 +31,8 @@ namespace sprout {
|
|||
// phase_spectrum
|
||||
//
|
||||
template<typename InputIterator, typename Result>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::algorithm<Result>::type phase_spectrum(
|
||||
InputIterator first,
|
||||
InputIterator last,
|
||||
Result const& result
|
||||
)
|
||||
{
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::algorithm<Result>::type
|
||||
phase_spectrum(InputIterator first, InputIterator last, Result const& result) {
|
||||
return sprout::fit::detail::phase_spectrum_impl(first, last, result, sprout::internal_begin_offset(result));
|
||||
}
|
||||
} // namespace fit
|
||||
|
|
|
@ -12,7 +12,8 @@ namespace sprout {
|
|||
namespace fit {
|
||||
namespace detail {
|
||||
template<typename Container>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::algorithm<Container>::type sawtooth_impl(
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::algorithm<Container>::type
|
||||
sawtooth_impl(
|
||||
Container const& cont,
|
||||
typename sprout::container_traits<Container>::value_type const& frequency,
|
||||
typename sprout::container_traits<Container>::value_type const& amplitude,
|
||||
|
@ -31,7 +32,8 @@ namespace sprout {
|
|||
// sawtooth
|
||||
//
|
||||
template<typename Container>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::algorithm<Container>::type sawtooth(
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::algorithm<Container>::type
|
||||
sawtooth(
|
||||
Container const& cont,
|
||||
typename sprout::container_traits<Container>::value_type const& frequency = 1,
|
||||
typename sprout::container_traits<Container>::value_type const& amplitude = 1,
|
||||
|
|
|
@ -12,7 +12,8 @@ namespace sprout {
|
|||
namespace fit {
|
||||
namespace detail {
|
||||
template<typename Container>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::algorithm<Container>::type sinusoid_impl(
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::algorithm<Container>::type
|
||||
sinusoid_impl(
|
||||
Container const& cont,
|
||||
typename sprout::container_traits<Container>::value_type const& frequency,
|
||||
typename sprout::container_traits<Container>::value_type const& amplitude,
|
||||
|
@ -31,7 +32,8 @@ namespace sprout {
|
|||
// sinusoid
|
||||
//
|
||||
template<typename Container>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::algorithm<Container>::type sinusoid(
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::algorithm<Container>::type
|
||||
sinusoid(
|
||||
Container const& cont,
|
||||
typename sprout::container_traits<Container>::value_type const& frequency = 1,
|
||||
typename sprout::container_traits<Container>::value_type const& amplitude = 1,
|
||||
|
|
|
@ -11,12 +11,8 @@ namespace sprout {
|
|||
// spectrum
|
||||
//
|
||||
template<typename InputIterator, typename Result>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::algorithm<Result>::type spectrum(
|
||||
InputIterator first,
|
||||
InputIterator last,
|
||||
Result const& result
|
||||
)
|
||||
{
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::algorithm<Result>::type
|
||||
spectrum(InputIterator first, InputIterator last, Result const& result) {
|
||||
return sprout::fit::amplitude_spectrum(first, last, result);
|
||||
}
|
||||
} // namespace fit
|
||||
|
|
|
@ -12,7 +12,8 @@ namespace sprout {
|
|||
namespace fit {
|
||||
namespace detail {
|
||||
template<typename Container>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::algorithm<Container>::type square_impl(
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::algorithm<Container>::type
|
||||
square_impl(
|
||||
Container const& cont,
|
||||
typename sprout::container_traits<Container>::value_type const& frequency,
|
||||
typename sprout::container_traits<Container>::value_type const& amplitude,
|
||||
|
@ -32,7 +33,8 @@ namespace sprout {
|
|||
// square
|
||||
//
|
||||
template<typename Container>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::algorithm<Container>::type square(
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::algorithm<Container>::type
|
||||
square(
|
||||
Container const& cont,
|
||||
typename sprout::container_traits<Container>::value_type const& frequency = 1,
|
||||
typename sprout::container_traits<Container>::value_type const& amplitude = 1,
|
||||
|
|
|
@ -12,7 +12,8 @@ namespace sprout {
|
|||
namespace fit {
|
||||
namespace detail {
|
||||
template<typename Container>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::algorithm<Container>::type triangle_impl(
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::algorithm<Container>::type
|
||||
triangle_impl(
|
||||
Container const& cont,
|
||||
typename sprout::container_traits<Container>::value_type const& frequency,
|
||||
typename sprout::container_traits<Container>::value_type const& amplitude,
|
||||
|
@ -31,7 +32,8 @@ namespace sprout {
|
|||
// triangle
|
||||
//
|
||||
template<typename Container>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::algorithm<Container>::type triangle(
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::algorithm<Container>::type
|
||||
triangle(
|
||||
Container const& cont,
|
||||
typename sprout::container_traits<Container>::value_type const& frequency = 1,
|
||||
typename sprout::container_traits<Container>::value_type const& amplitude = 1,
|
||||
|
|
|
@ -17,9 +17,7 @@ namespace sprout {
|
|||
template<typename InputIterator, typename Result, sprout::index_t... Indexes>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::result_of::algorithm<Result>::type
|
||||
amplitude_spectrum_impl(
|
||||
InputIterator first,
|
||||
InputIterator last,
|
||||
Result const& result,
|
||||
InputIterator first, InputIterator last, Result const& result,
|
||||
sprout::index_tuple<Indexes...>,
|
||||
typename sprout::container_traits<Result>::difference_type offset,
|
||||
typename sprout::container_traits<Result>::size_type size,
|
||||
|
@ -42,12 +40,7 @@ namespace sprout {
|
|||
}
|
||||
template<typename InputIterator, typename Result>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::result_of::algorithm<Result>::type
|
||||
amplitude_spectrum(
|
||||
InputIterator first,
|
||||
InputIterator last,
|
||||
Result const& result
|
||||
)
|
||||
{
|
||||
amplitude_spectrum(InputIterator first, InputIterator last, Result const& result) {
|
||||
return sprout::fixed::detail::amplitude_spectrum_impl(
|
||||
first,
|
||||
last,
|
||||
|
@ -64,12 +57,7 @@ namespace sprout {
|
|||
//
|
||||
template<typename InputIterator, typename Result>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::result_of::algorithm<Result>::type
|
||||
amplitude_spectrum(
|
||||
InputIterator first,
|
||||
InputIterator last,
|
||||
Result const& result
|
||||
)
|
||||
{
|
||||
amplitude_spectrum(InputIterator first, InputIterator last, Result const& result) {
|
||||
return sprout::fixed::detail::amplitude_spectrum(first, last, result);
|
||||
}
|
||||
} // namespace fixed
|
||||
|
|
|
@ -14,10 +14,9 @@ namespace sprout {
|
|||
namespace fixed {
|
||||
namespace detail {
|
||||
template<typename InputIterator, typename Result, sprout::index_t... Indexes>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::result_of::algorithm<Result>::type dft_impl(
|
||||
InputIterator first,
|
||||
InputIterator last,
|
||||
Result const& result,
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::result_of::algorithm<Result>::type
|
||||
dft_impl(
|
||||
InputIterator first, InputIterator last, Result const& result,
|
||||
sprout::index_tuple<Indexes...>,
|
||||
typename sprout::container_traits<Result>::difference_type offset,
|
||||
typename sprout::container_traits<Result>::size_type size,
|
||||
|
@ -34,12 +33,8 @@ namespace sprout {
|
|||
);
|
||||
}
|
||||
template<typename InputIterator, typename Result>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::result_of::algorithm<Result>::type dft(
|
||||
InputIterator first,
|
||||
InputIterator last,
|
||||
Result const& result
|
||||
)
|
||||
{
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::result_of::algorithm<Result>::type
|
||||
dft(InputIterator first, InputIterator last, Result const& result) {
|
||||
return sprout::fixed::detail::dft_impl(
|
||||
first,
|
||||
last,
|
||||
|
@ -55,12 +50,8 @@ namespace sprout {
|
|||
// dft
|
||||
//
|
||||
template<typename InputIterator, typename Result>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::result_of::algorithm<Result>::type dft(
|
||||
InputIterator first,
|
||||
InputIterator last,
|
||||
Result const& result
|
||||
)
|
||||
{
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::result_of::algorithm<Result>::type
|
||||
dft(InputIterator first, InputIterator last, Result const& result) {
|
||||
return sprout::fixed::detail::dft(first, last, result);
|
||||
}
|
||||
} // namespace fixed
|
||||
|
|
|
@ -14,10 +14,9 @@ namespace sprout {
|
|||
namespace fixed {
|
||||
namespace detail {
|
||||
template<typename InputIterator, typename Result, sprout::index_t... Indexes>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::result_of::algorithm<Result>::type idft_impl(
|
||||
InputIterator first,
|
||||
InputIterator last,
|
||||
Result const& result,
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::result_of::algorithm<Result>::type
|
||||
idft_impl(
|
||||
InputIterator first, InputIterator last, Result const& result,
|
||||
sprout::index_tuple<Indexes...>,
|
||||
typename sprout::container_traits<Result>::difference_type offset,
|
||||
typename sprout::container_traits<Result>::size_type size,
|
||||
|
@ -34,12 +33,8 @@ namespace sprout {
|
|||
);
|
||||
}
|
||||
template<typename InputIterator, typename Result>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::result_of::algorithm<Result>::type idft(
|
||||
InputIterator first,
|
||||
InputIterator last,
|
||||
Result const& result
|
||||
)
|
||||
{
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::result_of::algorithm<Result>::type
|
||||
idft(InputIterator first, InputIterator last, Result const& result) {
|
||||
return sprout::fixed::detail::idft_impl(
|
||||
first,
|
||||
last,
|
||||
|
@ -55,12 +50,8 @@ namespace sprout {
|
|||
// idft
|
||||
//
|
||||
template<typename InputIterator, typename Result>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::result_of::algorithm<Result>::type idft(
|
||||
InputIterator first,
|
||||
InputIterator last,
|
||||
Result const& result
|
||||
)
|
||||
{
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::result_of::algorithm<Result>::type
|
||||
idft(InputIterator first, InputIterator last, Result const& result) {
|
||||
return sprout::fixed::detail::idft(first, last, result);
|
||||
}
|
||||
} // namespace fixed
|
||||
|
|
|
@ -18,9 +18,7 @@ namespace sprout {
|
|||
template<typename InputIterator, typename Result, sprout::index_t... Indexes>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::result_of::algorithm<Result>::type
|
||||
phase_spectrum_impl(
|
||||
InputIterator first,
|
||||
InputIterator last,
|
||||
Result const& result,
|
||||
InputIterator first, InputIterator last, Result const& result,
|
||||
sprout::index_tuple<Indexes...>,
|
||||
typename sprout::container_traits<Result>::difference_type offset,
|
||||
typename sprout::container_traits<Result>::size_type size,
|
||||
|
@ -43,16 +41,9 @@ namespace sprout {
|
|||
}
|
||||
template<typename InputIterator, typename Result>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::result_of::algorithm<Result>::type
|
||||
phase_spectrum(
|
||||
InputIterator first,
|
||||
InputIterator last,
|
||||
Result const& result
|
||||
)
|
||||
{
|
||||
phase_spectrum(InputIterator first, InputIterator last, Result const& result) {
|
||||
return sprout::fixed::detail::phase_spectrum_impl(
|
||||
first,
|
||||
last,
|
||||
result,
|
||||
first, last, result,
|
||||
sprout::index_range<0, sprout::container_traits<Result>::static_size>::make(),
|
||||
sprout::internal_begin_offset(result),
|
||||
sprout::size(result),
|
||||
|
@ -65,12 +56,7 @@ namespace sprout {
|
|||
//
|
||||
template<typename InputIterator, typename Result>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::result_of::algorithm<Result>::type
|
||||
phase_spectrum(
|
||||
InputIterator first,
|
||||
InputIterator last,
|
||||
Result const& result
|
||||
)
|
||||
{
|
||||
phase_spectrum(InputIterator first, InputIterator last, Result const& result) {
|
||||
return sprout::fixed::detail::phase_spectrum(first, last, result);
|
||||
}
|
||||
} // namespace fixed
|
||||
|
|
|
@ -12,12 +12,7 @@ namespace sprout {
|
|||
//
|
||||
template<typename InputIterator, typename Result>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::result_of::algorithm<Result>::type
|
||||
spectrum(
|
||||
InputIterator first,
|
||||
InputIterator last,
|
||||
Result const& result
|
||||
)
|
||||
{
|
||||
spectrum(InputIterator first, InputIterator last, Result const& result) {
|
||||
return sprout::fixed::amplitude_spectrum(first, last, result);
|
||||
}
|
||||
} // namespace fixed
|
||||
|
|
|
@ -10,10 +10,9 @@
|
|||
namespace sprout {
|
||||
namespace detail {
|
||||
template<typename InputIterator, typename Size>
|
||||
inline SPROUT_CONSTEXPR typename std::iterator_traits<InputIterator>::value_type idft_element_impl(
|
||||
InputIterator first,
|
||||
InputIterator last,
|
||||
typename std::iterator_traits<InputIterator>::difference_type i,
|
||||
inline SPROUT_CONSTEXPR typename std::iterator_traits<InputIterator>::value_type
|
||||
idft_element_impl(
|
||||
InputIterator first, InputIterator last, typename std::iterator_traits<InputIterator>::difference_type i,
|
||||
Size size
|
||||
)
|
||||
{
|
||||
|
@ -32,16 +31,10 @@ namespace sprout {
|
|||
// idft_element
|
||||
//
|
||||
template<typename InputIterator>
|
||||
inline SPROUT_CONSTEXPR typename std::iterator_traits<InputIterator>::value_type idft_element(
|
||||
InputIterator first,
|
||||
InputIterator last,
|
||||
typename std::iterator_traits<InputIterator>::difference_type i
|
||||
)
|
||||
{
|
||||
inline SPROUT_CONSTEXPR typename std::iterator_traits<InputIterator>::value_type
|
||||
idft_element( InputIterator first, InputIterator last, typename std::iterator_traits<InputIterator>::difference_type i) {
|
||||
return sprout::detail::idft_element_impl(
|
||||
first,
|
||||
last,
|
||||
i,
|
||||
first, last, i,
|
||||
NS_SSCRISK_CEL_OR_SPROUT::distance(first, last)
|
||||
);
|
||||
}
|
||||
|
|
|
@ -13,11 +13,8 @@ namespace sprout {
|
|||
namespace fit {
|
||||
namespace detail {
|
||||
template<typename Container>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::algorithm<Container>::type bitrev_table_impl(
|
||||
Container const& cont,
|
||||
typename sprout::container_traits<Container>::difference_type offset
|
||||
)
|
||||
{
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::algorithm<Container>::type
|
||||
bitrev_table_impl(Container const& cont, typename sprout::container_traits<Container>::difference_type offset) {
|
||||
return sprout::sub_copy(
|
||||
sprout::get_internal(sprout::fixed::bitrev_table(cont)),
|
||||
offset,
|
||||
|
@ -29,10 +26,8 @@ namespace sprout {
|
|||
// bitrev_table
|
||||
//
|
||||
template<typename Container>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::algorithm<Container>::type bitrev_table(
|
||||
Container const& cont
|
||||
)
|
||||
{
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::algorithm<Container>::type
|
||||
bitrev_table(Container const& cont) {
|
||||
return sprout::fit::detail::bitrev_table_impl(cont, sprout::internal_begin_offset(cont));
|
||||
}
|
||||
} // namespace fit
|
||||
|
|
|
@ -16,9 +16,9 @@ namespace sprout {
|
|||
namespace fixed {
|
||||
namespace detail {
|
||||
template<typename Container, sprout::index_t... Indexes>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::result_of::algorithm<Container>::type bitrev_table_impl(
|
||||
Container const& cont,
|
||||
sprout::index_tuple<Indexes...>,
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::result_of::algorithm<Container>::type
|
||||
bitrev_table_impl(
|
||||
Container const& cont, sprout::index_tuple<Indexes...>,
|
||||
std::size_t bit_length,
|
||||
typename sprout::container_traits<Container>::difference_type offset,
|
||||
typename sprout::container_traits<Container>::size_type size
|
||||
|
@ -41,15 +41,12 @@ namespace sprout {
|
|||
// bitrev_table
|
||||
//
|
||||
template<typename Container>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::result_of::algorithm<Container>::type bitrev_table(
|
||||
Container const& cont
|
||||
)
|
||||
{
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::result_of::algorithm<Container>::type
|
||||
bitrev_table(Container const& cont) {
|
||||
return sprout::fixed::detail::bitrev_table_impl(
|
||||
cont,
|
||||
sprout::index_range<0, sprout::container_traits<Container>::static_size>::make(),
|
||||
sprout::empty(cont)
|
||||
? 0
|
||||
sprout::empty(cont) ? 0
|
||||
: sprout::bit_length(sprout::size(cont) - 1)
|
||||
,
|
||||
sprout::internal_begin_offset(cont),
|
||||
|
|
|
@ -14,10 +14,9 @@ namespace sprout {
|
|||
namespace fit {
|
||||
namespace detail {
|
||||
template<typename InputIterator, typename Result>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::algorithm<Result>::type adjacent_difference_impl(
|
||||
InputIterator first,
|
||||
InputIterator last,
|
||||
Result const& result,
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::algorithm<Result>::type
|
||||
adjacent_difference_impl(
|
||||
InputIterator first, InputIterator last, Result const& result,
|
||||
typename sprout::container_traits<Result>::difference_type offset
|
||||
)
|
||||
{
|
||||
|
@ -32,22 +31,16 @@ namespace sprout {
|
|||
// adjacent_difference
|
||||
//
|
||||
template<typename InputIterator, typename Result>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::algorithm<Result>::type adjacent_difference(
|
||||
InputIterator first,
|
||||
InputIterator last,
|
||||
Result const& result
|
||||
)
|
||||
{
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::algorithm<Result>::type
|
||||
adjacent_difference(InputIterator first, InputIterator last, Result const& result) {
|
||||
return sprout::fit::detail::adjacent_difference_impl(first, last, result, sprout::internal_begin_offset(result));
|
||||
}
|
||||
|
||||
namespace detail {
|
||||
template<typename InputIterator, typename Result, typename BinaryOperation>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::algorithm<Result>::type adjacent_difference_impl(
|
||||
InputIterator first,
|
||||
InputIterator last,
|
||||
Result const& result,
|
||||
BinaryOperation binary_op,
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::algorithm<Result>::type
|
||||
adjacent_difference_impl(
|
||||
InputIterator first, InputIterator last, Result const& result, BinaryOperation binary_op,
|
||||
typename sprout::container_traits<Result>::difference_type offset
|
||||
)
|
||||
{
|
||||
|
@ -62,13 +55,8 @@ namespace sprout {
|
|||
// adjacent_difference
|
||||
//
|
||||
template<typename InputIterator, typename Result, typename BinaryOperation>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::algorithm<Result>::type adjacent_difference(
|
||||
InputIterator first,
|
||||
InputIterator last,
|
||||
Result const& result,
|
||||
BinaryOperation binary_op
|
||||
)
|
||||
{
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::algorithm<Result>::type
|
||||
adjacent_difference(InputIterator first, InputIterator last, Result const& result, BinaryOperation binary_op) {
|
||||
return sprout::fit::detail::adjacent_difference_impl(first, last, result, binary_op, sprout::internal_begin_offset(result));
|
||||
}
|
||||
} // namespace fit
|
||||
|
|
|
@ -12,9 +12,9 @@ namespace sprout {
|
|||
namespace fit {
|
||||
namespace detail {
|
||||
template<typename Container, typename T>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::algorithm<Container>::type iota_impl(
|
||||
Container const& cont,
|
||||
T const& value,
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::algorithm<Container>::type
|
||||
iota_impl(
|
||||
Container const& cont, T const& value,
|
||||
typename sprout::container_traits<Container>::difference_type offset
|
||||
)
|
||||
{
|
||||
|
@ -29,11 +29,8 @@ namespace sprout {
|
|||
// iota
|
||||
//
|
||||
template<typename Container, typename T>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::algorithm<Container>::type iota(
|
||||
Container const& cont,
|
||||
T const& value
|
||||
)
|
||||
{
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::algorithm<Container>::type
|
||||
iota(Container const& cont, T const& value) {
|
||||
return sprout::fit::detail::iota_impl(cont, value, sprout::internal_begin_offset(cont));
|
||||
}
|
||||
} // namespace fit
|
||||
|
|
|
@ -14,10 +14,9 @@ namespace sprout {
|
|||
namespace fit {
|
||||
namespace detail {
|
||||
template<typename InputIterator, typename Result>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::algorithm<Result>::type partial_sum_impl(
|
||||
InputIterator first,
|
||||
InputIterator last,
|
||||
Result const& result,
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::algorithm<Result>::type
|
||||
partial_sum_impl(
|
||||
InputIterator first, InputIterator last, Result const& result,
|
||||
typename sprout::container_traits<Result>::difference_type offset
|
||||
)
|
||||
{
|
||||
|
@ -32,22 +31,16 @@ namespace sprout {
|
|||
// partial_sum
|
||||
//
|
||||
template<typename InputIterator, typename Result>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::algorithm<Result>::type partial_sum(
|
||||
InputIterator first,
|
||||
InputIterator last,
|
||||
Result const& result
|
||||
)
|
||||
{
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::algorithm<Result>::type
|
||||
partial_sum(InputIterator first, InputIterator last, Result const& result) {
|
||||
return sprout::fit::detail::partial_sum_impl(first, last, result, sprout::internal_begin_offset(result));
|
||||
}
|
||||
|
||||
namespace detail {
|
||||
template<typename InputIterator, typename Result, typename BinaryOperation>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::algorithm<Result>::type partial_sum_impl(
|
||||
InputIterator first,
|
||||
InputIterator last,
|
||||
Result const& result,
|
||||
BinaryOperation binary_op,
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::algorithm<Result>::type
|
||||
partial_sum_impl(
|
||||
InputIterator first, InputIterator last, Result const& result, BinaryOperation binary_op,
|
||||
typename sprout::container_traits<Result>::difference_type offset
|
||||
)
|
||||
{
|
||||
|
@ -62,13 +55,8 @@ namespace sprout {
|
|||
// partial_sum
|
||||
//
|
||||
template<typename InputIterator, typename Result, typename BinaryOperation>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::algorithm<Result>::type partial_sum(
|
||||
InputIterator first,
|
||||
InputIterator last,
|
||||
Result const& result,
|
||||
BinaryOperation binary_op
|
||||
)
|
||||
{
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::algorithm<Result>::type
|
||||
partial_sum(InputIterator first, InputIterator last, Result const& result, BinaryOperation binary_op) {
|
||||
return sprout::fit::detail::partial_sum_impl(first, last, result, binary_op, sprout::internal_begin_offset(result));
|
||||
}
|
||||
} // namespace fit
|
||||
|
|
|
@ -15,10 +15,9 @@ namespace sprout {
|
|||
inline SPROUT_CONSTEXPR typename std::enable_if<
|
||||
sprout::container_traits<Result>::static_size == sizeof...(Args),
|
||||
typename sprout::fixed::result_of::algorithm<Result>::type
|
||||
>::type adjacent_difference_impl_1(
|
||||
InputIterator first,
|
||||
InputIterator last,
|
||||
Result const& result,
|
||||
>::type
|
||||
adjacent_difference_impl_1(
|
||||
InputIterator first, InputIterator last, Result const& result,
|
||||
typename sprout::container_traits<Result>::size_type size,
|
||||
typename sprout::container_traits<Result>::value_type const& value,
|
||||
Args const&... args
|
||||
|
@ -30,10 +29,9 @@ namespace sprout {
|
|||
inline SPROUT_CONSTEXPR typename std::enable_if<
|
||||
sprout::container_traits<Result>::static_size != sizeof...(Args),
|
||||
typename sprout::fixed::result_of::algorithm<Result>::type
|
||||
>::type adjacent_difference_impl_1(
|
||||
InputIterator first,
|
||||
InputIterator last,
|
||||
Result const& result,
|
||||
>::type
|
||||
adjacent_difference_impl_1(
|
||||
InputIterator first, InputIterator last, Result const& result,
|
||||
typename sprout::container_traits<Result>::size_type size,
|
||||
typename sprout::container_traits<Result>::value_type const& value,
|
||||
Args const&... args
|
||||
|
@ -48,10 +46,9 @@ namespace sprout {
|
|||
inline SPROUT_CONSTEXPR typename std::enable_if<
|
||||
sprout::container_traits<Result>::static_size == 0,
|
||||
typename sprout::fixed::result_of::algorithm<Result>::type
|
||||
>::type adjacent_difference_impl(
|
||||
InputIterator first,
|
||||
InputIterator last,
|
||||
Result const& result,
|
||||
>::type
|
||||
adjacent_difference_impl(
|
||||
InputIterator first, InputIterator last, Result const& result,
|
||||
typename sprout::container_traits<Result>::size_type size
|
||||
)
|
||||
{
|
||||
|
@ -61,10 +58,9 @@ namespace sprout {
|
|||
inline SPROUT_CONSTEXPR typename std::enable_if<
|
||||
sprout::container_traits<Result>::static_size != 0,
|
||||
typename sprout::fixed::result_of::algorithm<Result>::type
|
||||
>::type adjacent_difference_impl_1(
|
||||
InputIterator first,
|
||||
InputIterator last,
|
||||
Result const& result,
|
||||
>::type
|
||||
adjacent_difference_impl_1(
|
||||
InputIterator first, InputIterator last, Result const& result,
|
||||
typename sprout::container_traits<Result>::size_type size
|
||||
)
|
||||
{
|
||||
|
@ -78,12 +74,8 @@ namespace sprout {
|
|||
// adjacent_difference
|
||||
//
|
||||
template<typename InputIterator, typename Result>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::result_of::algorithm<Result>::type adjacent_difference(
|
||||
InputIterator first,
|
||||
InputIterator last,
|
||||
Result const& result
|
||||
)
|
||||
{
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::result_of::algorithm<Result>::type
|
||||
adjacent_difference(InputIterator first, InputIterator last, Result const& result) {
|
||||
return sprout::fixed::detail::adjacent_difference_impl(first, last, result, sprout::size(result));
|
||||
}
|
||||
|
||||
|
@ -92,11 +84,9 @@ namespace sprout {
|
|||
inline SPROUT_CONSTEXPR typename std::enable_if<
|
||||
sprout::container_traits<Result>::static_size == sizeof...(Args),
|
||||
typename sprout::fixed::result_of::algorithm<Result>::type
|
||||
>::type adjacent_difference_impl_1(
|
||||
InputIterator first,
|
||||
InputIterator last,
|
||||
Result const& result,
|
||||
BinaryOperation binary_op,
|
||||
>::type
|
||||
adjacent_difference_impl_1(
|
||||
InputIterator first, InputIterator last, Result const& result, BinaryOperation binary_op,
|
||||
typename sprout::container_traits<Result>::size_type size,
|
||||
typename sprout::container_traits<Result>::value_type const& value,
|
||||
Args const&... args
|
||||
|
@ -108,11 +98,9 @@ namespace sprout {
|
|||
inline SPROUT_CONSTEXPR typename std::enable_if<
|
||||
sprout::container_traits<Result>::static_size != sizeof...(Args),
|
||||
typename sprout::fixed::result_of::algorithm<Result>::type
|
||||
>::type adjacent_difference_impl_1(
|
||||
InputIterator first,
|
||||
InputIterator last,
|
||||
Result const& result,
|
||||
BinaryOperation binary_op,
|
||||
>::type
|
||||
adjacent_difference_impl_1(
|
||||
InputIterator first, InputIterator last, Result const& result, BinaryOperation binary_op,
|
||||
typename sprout::container_traits<Result>::size_type size,
|
||||
typename sprout::container_traits<Result>::value_type const& value,
|
||||
Args const&... args
|
||||
|
@ -127,11 +115,9 @@ namespace sprout {
|
|||
inline SPROUT_CONSTEXPR typename std::enable_if<
|
||||
sprout::container_traits<Result>::static_size == 0,
|
||||
typename sprout::fixed::result_of::algorithm<Result>::type
|
||||
>::type adjacent_difference_impl(
|
||||
InputIterator first,
|
||||
InputIterator last,
|
||||
Result const& result,
|
||||
BinaryOperation binary_op,
|
||||
>::type
|
||||
adjacent_difference_impl(
|
||||
InputIterator first, InputIterator last, Result const& result, BinaryOperation binary_op,
|
||||
typename sprout::container_traits<Result>::size_type size
|
||||
)
|
||||
{
|
||||
|
@ -141,11 +127,9 @@ namespace sprout {
|
|||
inline SPROUT_CONSTEXPR typename std::enable_if<
|
||||
sprout::container_traits<Result>::static_size != 0,
|
||||
typename sprout::fixed::result_of::algorithm<Result>::type
|
||||
>::type adjacent_difference_impl_1(
|
||||
InputIterator first,
|
||||
InputIterator last,
|
||||
Result const& result,
|
||||
BinaryOperation binary_op,
|
||||
>::type
|
||||
adjacent_difference_impl_1(
|
||||
InputIterator first, InputIterator last, Result const& result, BinaryOperation binary_op,
|
||||
typename sprout::container_traits<Result>::size_type size
|
||||
)
|
||||
{
|
||||
|
@ -159,13 +143,8 @@ namespace sprout {
|
|||
// adjacent_difference
|
||||
//
|
||||
template<typename InputIterator, typename Result, typename BinaryOperation>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::result_of::algorithm<Result>::type adjacent_difference(
|
||||
InputIterator first,
|
||||
InputIterator last,
|
||||
Result const& result,
|
||||
BinaryOperation binary_op
|
||||
)
|
||||
{
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::result_of::algorithm<Result>::type
|
||||
adjacent_difference(InputIterator first, InputIterator last, Result const& result, BinaryOperation binary_op) {
|
||||
return sprout::fixed::detail::adjacent_difference_impl(first, last, result, binary_op, sprout::size(result));
|
||||
}
|
||||
} // namespace fixed
|
||||
|
|
|
@ -12,9 +12,9 @@ namespace sprout {
|
|||
namespace fixed {
|
||||
namespace detail {
|
||||
template<typename Container, typename T, sprout::index_t... Indexes>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::result_of::algorithm<Container>::type iota_impl(
|
||||
Container const& cont,
|
||||
sprout::index_tuple<Indexes...>,
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::result_of::algorithm<Container>::type
|
||||
iota_impl(
|
||||
Container const& cont, sprout::index_tuple<Indexes...>,
|
||||
T value,
|
||||
typename sprout::container_traits<Container>::difference_type offset,
|
||||
typename sprout::container_traits<Container>::size_type size
|
||||
|
@ -34,11 +34,8 @@ namespace sprout {
|
|||
// iota
|
||||
//
|
||||
template<typename Container, typename T>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::result_of::algorithm<Container>::type iota(
|
||||
Container const& cont,
|
||||
T value
|
||||
)
|
||||
{
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::result_of::algorithm<Container>::type
|
||||
iota(Container const& cont, T value) {
|
||||
return sprout::fixed::detail::iota_impl(
|
||||
cont,
|
||||
sprout::index_range<0, sprout::container_traits<Container>::static_size>::make(),
|
||||
|
|
|
@ -16,10 +16,9 @@ namespace sprout {
|
|||
inline SPROUT_CONSTEXPR typename std::enable_if<
|
||||
sprout::container_traits<Result>::static_size == sizeof...(Args) + 1,
|
||||
typename sprout::fixed::result_of::algorithm<Result>::type
|
||||
>::type partial_sum_impl_1(
|
||||
InputIterator first,
|
||||
InputIterator last,
|
||||
Result const& result,
|
||||
>::type
|
||||
partial_sum_impl_1(
|
||||
InputIterator first, InputIterator last, Result const& result,
|
||||
typename sprout::container_traits<Result>::size_type size,
|
||||
typename sprout::container_traits<Result>::value_type const& value,
|
||||
Args const&... args
|
||||
|
@ -31,10 +30,9 @@ namespace sprout {
|
|||
inline SPROUT_CONSTEXPR typename std::enable_if<
|
||||
sprout::container_traits<Result>::static_size != sizeof...(Args) + 1,
|
||||
typename sprout::fixed::result_of::algorithm<Result>::type
|
||||
>::type partial_sum_impl_1(
|
||||
InputIterator first,
|
||||
InputIterator last,
|
||||
Result const& result,
|
||||
>::type
|
||||
partial_sum_impl_1(
|
||||
InputIterator first, InputIterator last, Result const& result,
|
||||
typename sprout::container_traits<Result>::size_type size,
|
||||
typename sprout::container_traits<Result>::value_type const& value,
|
||||
Args const&... args
|
||||
|
@ -49,10 +47,9 @@ namespace sprout {
|
|||
inline SPROUT_CONSTEXPR typename std::enable_if<
|
||||
sprout::container_traits<Result>::static_size == 0,
|
||||
typename sprout::fixed::result_of::algorithm<Result>::type
|
||||
>::type partial_sum_impl(
|
||||
InputIterator first,
|
||||
InputIterator last,
|
||||
Result const& result,
|
||||
>::type
|
||||
partial_sum_impl(
|
||||
InputIterator first, InputIterator last, Result const& result,
|
||||
typename sprout::container_traits<Result>::size_type size
|
||||
)
|
||||
{
|
||||
|
@ -62,10 +59,9 @@ namespace sprout {
|
|||
inline SPROUT_CONSTEXPR typename std::enable_if<
|
||||
sprout::container_traits<Result>::static_size != 0,
|
||||
typename sprout::fixed::result_of::algorithm<Result>::type
|
||||
>::type partial_sum_impl(
|
||||
InputIterator first,
|
||||
InputIterator last,
|
||||
Result const& result,
|
||||
>::type
|
||||
partial_sum_impl(
|
||||
InputIterator first, InputIterator last, Result const& result,
|
||||
typename sprout::container_traits<Result>::size_type size
|
||||
)
|
||||
{
|
||||
|
@ -79,12 +75,8 @@ namespace sprout {
|
|||
// partial_sum
|
||||
//
|
||||
template<typename InputIterator, typename Result>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::result_of::algorithm<Result>::type partial_sum(
|
||||
InputIterator first,
|
||||
InputIterator last,
|
||||
Result const& result
|
||||
)
|
||||
{
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::result_of::algorithm<Result>::type
|
||||
partial_sum(InputIterator first, InputIterator last, Result const& result) {
|
||||
return sprout::fixed::detail::partial_sum_impl(first, last, result, sprout::size(result));
|
||||
}
|
||||
|
||||
|
@ -93,11 +85,9 @@ namespace sprout {
|
|||
inline SPROUT_CONSTEXPR typename std::enable_if<
|
||||
sprout::container_traits<Result>::static_size == sizeof...(Args) + 1,
|
||||
typename sprout::fixed::result_of::algorithm<Result>::type
|
||||
>::type partial_sum_impl_1(
|
||||
InputIterator first,
|
||||
InputIterator last,
|
||||
Result const& result,
|
||||
BinaryOperation binary_op,
|
||||
>::type
|
||||
partial_sum_impl_1(
|
||||
InputIterator first, InputIterator last, Result const& result, BinaryOperation binary_op,
|
||||
typename sprout::container_traits<Result>::size_type size,
|
||||
typename sprout::container_traits<Result>::value_type const& value,
|
||||
Args const&... args
|
||||
|
@ -109,11 +99,9 @@ namespace sprout {
|
|||
inline SPROUT_CONSTEXPR typename std::enable_if<
|
||||
sprout::container_traits<Result>::static_size != sizeof...(Args) + 1,
|
||||
typename sprout::fixed::result_of::algorithm<Result>::type
|
||||
>::type partial_sum_impl_1(
|
||||
InputIterator first,
|
||||
InputIterator last,
|
||||
Result const& result,
|
||||
BinaryOperation binary_op,
|
||||
>::type
|
||||
partial_sum_impl_1(
|
||||
InputIterator first, InputIterator last, Result const& result, BinaryOperation binary_op,
|
||||
typename sprout::container_traits<Result>::size_type size,
|
||||
typename sprout::container_traits<Result>::value_type const& value,
|
||||
Args const&... args
|
||||
|
@ -128,11 +116,9 @@ namespace sprout {
|
|||
inline SPROUT_CONSTEXPR typename std::enable_if<
|
||||
sprout::container_traits<Result>::static_size == 0,
|
||||
typename sprout::fixed::result_of::algorithm<Result>::type
|
||||
>::type partial_sum_impl(
|
||||
InputIterator first,
|
||||
InputIterator last,
|
||||
Result const& result,
|
||||
BinaryOperation binary_op,
|
||||
>::type
|
||||
partial_sum_impl(
|
||||
InputIterator first, InputIterator last, Result const& result, BinaryOperation binary_op,
|
||||
typename sprout::container_traits<Result>::size_type size
|
||||
)
|
||||
{
|
||||
|
@ -142,11 +128,9 @@ namespace sprout {
|
|||
inline SPROUT_CONSTEXPR typename std::enable_if<
|
||||
sprout::container_traits<Result>::static_size != 0,
|
||||
typename sprout::fixed::result_of::algorithm<Result>::type
|
||||
>::type partial_sum_impl(
|
||||
InputIterator first,
|
||||
InputIterator last,
|
||||
Result const& result,
|
||||
BinaryOperation binary_op,
|
||||
>::type
|
||||
partial_sum_impl(
|
||||
InputIterator first, InputIterator last, Result const& result, BinaryOperation binary_op,
|
||||
typename sprout::container_traits<Result>::size_type size
|
||||
)
|
||||
{
|
||||
|
@ -160,13 +144,8 @@ namespace sprout {
|
|||
// partial_sum
|
||||
//
|
||||
template<typename InputIterator, typename Result, typename BinaryOperation>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::result_of::algorithm<Result>::type partial_sum(
|
||||
InputIterator first,
|
||||
InputIterator last,
|
||||
Result const& result,
|
||||
BinaryOperation binary_op
|
||||
)
|
||||
{
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::result_of::algorithm<Result>::type
|
||||
partial_sum(InputIterator first, InputIterator last, Result const& result, BinaryOperation binary_op) {
|
||||
return sprout::fixed::detail::partial_sum_impl(first, last, result, binary_op, sprout::size(result));
|
||||
}
|
||||
} // namespace fixed
|
||||
|
|
|
@ -11,40 +11,25 @@ namespace sprout {
|
|||
|
||||
// 26.7.3 Inner product
|
||||
template<typename InputIterator1, typename InputIterator2, typename T, typename BinaryOperation1, typename BinaryOperation2>
|
||||
inline SPROUT_CONSTEXPR T inner_product(
|
||||
InputIterator1 first1,
|
||||
InputIterator1 last1,
|
||||
InputIterator2 first2,
|
||||
T init,
|
||||
BinaryOperation1 binary_op1,
|
||||
BinaryOperation2 binary_op2
|
||||
inline SPROUT_CONSTEXPR T
|
||||
inner_product(
|
||||
InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, T init,
|
||||
BinaryOperation1 binary_op1, BinaryOperation2 binary_op2
|
||||
)
|
||||
{
|
||||
return first1 == last1 ? init
|
||||
: sprout::inner_product(
|
||||
sprout::next(first1),
|
||||
last1,
|
||||
sprout::next(first2),
|
||||
binary_op1(init, binary_op2(*first1, *first2)),
|
||||
binary_op1,
|
||||
binary_op2
|
||||
sprout::next(first1), last1, sprout::next(first2), binary_op1(init, binary_op2(*first1, *first2)),
|
||||
binary_op1, binary_op2
|
||||
)
|
||||
;
|
||||
}
|
||||
|
||||
template<typename InputIterator1, typename InputIterator2, typename T>
|
||||
inline SPROUT_CONSTEXPR T inner_product(
|
||||
InputIterator1 first1,
|
||||
InputIterator1 last1,
|
||||
InputIterator2 first2,
|
||||
T init
|
||||
)
|
||||
{
|
||||
inline SPROUT_CONSTEXPR T
|
||||
inner_product(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, T init) {
|
||||
return sprout::inner_product(
|
||||
first1,
|
||||
last1,
|
||||
first2,
|
||||
init,
|
||||
first1, last1, first2, init,
|
||||
sprout::plus<typename std::iterator_traits<InputIterator1>::value_type>(),
|
||||
NS_SSCRISK_CEL_OR_SPROUT::multiplies<typename std::iterator_traits<InputIterator1>::value_type>()
|
||||
);
|
||||
|
|
|
@ -28,9 +28,9 @@ namespace sprout {
|
|||
// append
|
||||
//
|
||||
template<typename Container, typename Input>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::append<Container, Input>::type append(
|
||||
Container const& cont,
|
||||
typename sprout::container_traits<Container>::const_iterator pos,
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::append<Container, Input>::type
|
||||
append(
|
||||
Container const& cont, typename sprout::container_traits<Container>::const_iterator pos,
|
||||
Input const& input
|
||||
)
|
||||
{
|
||||
|
@ -40,13 +40,10 @@ namespace sprout {
|
|||
sprout::internal_end_offset(cont) + sprout::size(input)
|
||||
);
|
||||
}
|
||||
//
|
||||
// append
|
||||
//
|
||||
template<typename Container, typename Input>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::append<Container, Input>::type append(
|
||||
Container const& cont,
|
||||
typename sprout::container_traits<Container>::difference_type pos,
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::append<Container, Input>::type
|
||||
append(
|
||||
Container const& cont, typename sprout::container_traits<Container>::difference_type pos,
|
||||
Input const& input
|
||||
)
|
||||
{
|
||||
|
|
|
@ -27,11 +27,8 @@ namespace sprout {
|
|||
// append_back
|
||||
//
|
||||
template<typename Container, typename Input>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::append_back<Container, Input>::type append_back(
|
||||
Container const& cont,
|
||||
Input const& input
|
||||
)
|
||||
{
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::append_back<Container, Input>::type
|
||||
append_back(Container const& cont, Input const& input) {
|
||||
return sprout::sub_copy(
|
||||
sprout::get_internal(sprout::fixed::append_back(cont, input)),
|
||||
sprout::internal_begin_offset(cont),
|
||||
|
|
|
@ -27,11 +27,8 @@ namespace sprout {
|
|||
// append_front
|
||||
//
|
||||
template<typename Container, typename Input>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::append_front<Container, Input>::type append_front(
|
||||
Container const& cont,
|
||||
Input const& input
|
||||
)
|
||||
{
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::append_front<Container, Input>::type
|
||||
append_front(Container const& cont, Input const& input) {
|
||||
return sprout::sub_copy(
|
||||
sprout::get_internal(sprout::fixed::append_front(cont, input)),
|
||||
sprout::internal_begin_offset(cont),
|
||||
|
|
|
@ -29,26 +29,17 @@ namespace sprout {
|
|||
// erase
|
||||
//
|
||||
template<typename Container>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::erase<Container>::type erase(
|
||||
Container const& cont,
|
||||
typename sprout::container_traits<Container>::const_iterator pos
|
||||
)
|
||||
{
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::erase<Container>::type
|
||||
erase(Container const& cont, typename sprout::container_traits<Container>::const_iterator pos) {
|
||||
return sprout::sub_copy(
|
||||
sprout::get_internal(sprout::fixed::erase(cont, pos)),
|
||||
sprout::internal_begin_offset(cont),
|
||||
sprout::internal_end_offset(cont) - 1
|
||||
);
|
||||
}
|
||||
//
|
||||
// erase
|
||||
//
|
||||
template<typename Container>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::erase<Container>::type erase(
|
||||
Container const& cont,
|
||||
typename sprout::container_traits<Container>::difference_type pos
|
||||
)
|
||||
{
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::erase<Container>::type
|
||||
erase(Container const& cont, typename sprout::container_traits<Container>::difference_type pos) {
|
||||
return sprout::sub_copy(
|
||||
sprout::get_internal(sprout::fixed::erase(cont, pos)),
|
||||
sprout::internal_begin_offset(cont),
|
||||
|
|
|
@ -29,26 +29,17 @@ namespace sprout {
|
|||
// erase_n
|
||||
//
|
||||
template<std::size_t N, typename Container>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::erase_n<N, Container>::type erase_n(
|
||||
Container const& cont,
|
||||
typename sprout::container_traits<Container>::const_iterator pos
|
||||
)
|
||||
{
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::erase_n<N, Container>::type
|
||||
erase_n(Container const& cont, typename sprout::container_traits<Container>::const_iterator pos) {
|
||||
return sprout::sub_copy(
|
||||
sprout::get_internal(sprout::fixed::erase_n<N>(cont, pos)),
|
||||
sprout::internal_begin_offset(cont),
|
||||
sprout::internal_end_offset(cont) - 1
|
||||
);
|
||||
}
|
||||
//
|
||||
// erase_n
|
||||
//
|
||||
template<std::size_t N, typename Container>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::erase_n<N, Container>::type erase_n(
|
||||
Container const& cont,
|
||||
typename sprout::container_traits<Container>::difference_type pos
|
||||
)
|
||||
{
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::erase_n<N, Container>::type
|
||||
erase_n(Container const& cont, typename sprout::container_traits<Container>::difference_type pos) {
|
||||
return sprout::sub_copy(
|
||||
sprout::get_internal(sprout::fixed::erase_n<N>(cont, pos)),
|
||||
sprout::internal_begin_offset(cont),
|
||||
|
|
|
@ -29,11 +29,10 @@ namespace sprout {
|
|||
// insert
|
||||
//
|
||||
template<typename Container, typename T, typename... Values>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::insert<Container, T, Values...>::type insert(
|
||||
Container const& cont,
|
||||
typename sprout::container_traits<Container>::const_iterator pos,
|
||||
T const& v,
|
||||
Values const&... values
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::insert<Container, T, Values...>::type
|
||||
insert(
|
||||
Container const& cont, typename sprout::container_traits<Container>::const_iterator pos,
|
||||
T const& v, Values const&... values
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
|
@ -42,15 +41,11 @@ namespace sprout {
|
|||
sprout::internal_end_offset(cont) + 1 + sizeof...(Values)
|
||||
);
|
||||
}
|
||||
//
|
||||
// insert
|
||||
//
|
||||
template<typename Container, typename T, typename... Values>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::insert<Container, T, Values...>::type insert(
|
||||
Container const& cont,
|
||||
typename sprout::container_traits<Container>::difference_type pos,
|
||||
T const& v,
|
||||
Values const&... values
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::insert<Container, T, Values...>::type
|
||||
insert(
|
||||
Container const& cont, typename sprout::container_traits<Container>::difference_type pos,
|
||||
T const& v, Values const&... values
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
|
|
|
@ -29,11 +29,10 @@ namespace sprout {
|
|||
// insert_n
|
||||
//
|
||||
template<std::size_t N, typename Container, typename T, typename... Values>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::insert_n<N, Container, T, Values...>::type insert_n(
|
||||
Container const& cont,
|
||||
typename sprout::container_traits<Container>::const_iterator pos,
|
||||
T const& v,
|
||||
Values const&... values
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::insert_n<N, Container, T, Values...>::type
|
||||
insert_n(
|
||||
Container const& cont, typename sprout::container_traits<Container>::const_iterator pos,
|
||||
T const& v, Values const&... values
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
|
@ -42,15 +41,11 @@ namespace sprout {
|
|||
sprout::internal_end_offset(cont) + (1 + sizeof...(Values)) * N
|
||||
);
|
||||
}
|
||||
//
|
||||
// insert_n
|
||||
//
|
||||
template<std::size_t N, typename Container, typename T, typename... Values>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::insert_n<N, Container, T, Values...>::type insert_n(
|
||||
Container const& cont,
|
||||
typename sprout::container_traits<Container>::difference_type pos,
|
||||
T const& v,
|
||||
Values const&... values
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::insert_n<N, Container, T, Values...>::type
|
||||
insert_n(
|
||||
Container const& cont, typename sprout::container_traits<Container>::difference_type pos,
|
||||
T const& v, Values const&... values
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
|
|
|
@ -29,10 +29,8 @@ namespace sprout {
|
|||
// pop_back
|
||||
//
|
||||
template<typename Container>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::pop_back<Container>::type pop_back(
|
||||
Container const& cont
|
||||
)
|
||||
{
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::pop_back<Container>::type
|
||||
pop_back(Container const& cont) {
|
||||
return sprout::sub_copy(
|
||||
sprout::get_internal(sprout::fixed::pop_back(cont)),
|
||||
sprout::internal_begin_offset(cont),
|
||||
|
|
|
@ -29,10 +29,8 @@ namespace sprout {
|
|||
// pop_back_n
|
||||
//
|
||||
template<std::size_t N, typename Container>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::pop_back_n<N, Container>::type pop_back_n(
|
||||
Container const& cont
|
||||
)
|
||||
{
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::pop_back_n<N, Container>::type
|
||||
pop_back_n(Container const& cont) {
|
||||
return sprout::sub_copy(
|
||||
sprout::get_internal(sprout::fixed::pop_back_n<N>(cont)),
|
||||
sprout::internal_begin_offset(cont),
|
||||
|
|
|
@ -29,10 +29,8 @@ namespace sprout {
|
|||
// pop_front
|
||||
//
|
||||
template<typename Container>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::pop_front<Container>::type pop_front(
|
||||
Container const& cont
|
||||
)
|
||||
{
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::pop_front<Container>::type
|
||||
pop_front(Container const& cont) {
|
||||
return sprout::sub_copy(
|
||||
sprout::get_internal(sprout::fixed::pop_front(cont)),
|
||||
sprout::internal_begin_offset(cont),
|
||||
|
|
|
@ -29,10 +29,8 @@ namespace sprout {
|
|||
// pop_front_n
|
||||
//
|
||||
template<std::size_t N, typename Container>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::pop_front_n<N, Container>::type pop_front_n(
|
||||
Container const& cont
|
||||
)
|
||||
{
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::pop_front_n<N, Container>::type
|
||||
pop_front_n(Container const& cont) {
|
||||
return sprout::sub_copy(
|
||||
sprout::get_internal(sprout::fixed::pop_front_n<N>(cont)),
|
||||
sprout::internal_begin_offset(cont),
|
||||
|
|
|
@ -28,12 +28,8 @@ namespace sprout {
|
|||
// push_back
|
||||
//
|
||||
template<typename Container, typename T, typename... Values>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::push_back<Container, T, Values...>::type push_back(
|
||||
Container const& cont,
|
||||
T const& v,
|
||||
Values const&... values
|
||||
)
|
||||
{
|
||||
inline SPROUT_CONSTEXPR 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::get_internal(sprout::fixed::push_back(cont, v, values...)),
|
||||
sprout::internal_begin_offset(cont),
|
||||
|
|
|
@ -28,12 +28,8 @@ namespace sprout {
|
|||
// push_back_n
|
||||
//
|
||||
template<std::size_t N, typename Container, typename T, typename... Values>
|
||||
inline SPROUT_CONSTEXPR 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
|
||||
)
|
||||
{
|
||||
inline SPROUT_CONSTEXPR 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::get_internal(sprout::fixed::push_back_n<N>(cont, v, values...)),
|
||||
sprout::internal_begin_offset(cont),
|
||||
|
|
|
@ -28,12 +28,8 @@ namespace sprout {
|
|||
// push_front
|
||||
//
|
||||
template<typename Container, typename T, typename... Values>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::push_front<Container, T, Values...>::type push_front(
|
||||
Container const& cont,
|
||||
T const& v,
|
||||
Values const&... values
|
||||
)
|
||||
{
|
||||
inline SPROUT_CONSTEXPR 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::get_internal(sprout::fixed::push_front(cont, v, values...)),
|
||||
sprout::internal_begin_offset(cont),
|
||||
|
|
|
@ -28,12 +28,8 @@ namespace sprout {
|
|||
// push_front_n
|
||||
//
|
||||
template<std::size_t N, typename Container, typename T, typename... Values>
|
||||
inline SPROUT_CONSTEXPR 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
|
||||
)
|
||||
{
|
||||
inline SPROUT_CONSTEXPR 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::get_internal(sprout::fixed::push_front_n<N>(cont, v, values...)),
|
||||
sprout::internal_begin_offset(cont),
|
||||
|
|
|
@ -28,26 +28,17 @@ namespace sprout {
|
|||
// realign
|
||||
//
|
||||
template<typename Container, typename T>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::realign<Container>::type realign(
|
||||
Container const& cont,
|
||||
T const& v
|
||||
)
|
||||
{
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::realign<Container>::type
|
||||
realign(Container const& cont, T const& v) {
|
||||
return sprout::sub_copy(
|
||||
sprout::get_internal(sprout::fixed::realign(cont, v)),
|
||||
0,
|
||||
sprout::size(cont)
|
||||
);
|
||||
}
|
||||
|
||||
//
|
||||
// realign
|
||||
//
|
||||
template<typename Container>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::realign<Container>::type realign(
|
||||
Container const& cont
|
||||
)
|
||||
{
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::realign<Container>::type
|
||||
realign(Container const& cont) {
|
||||
return sprout::sub_copy(
|
||||
sprout::get_internal(sprout::fixed::realign(cont)),
|
||||
0,
|
||||
|
|
|
@ -28,26 +28,17 @@ namespace sprout {
|
|||
// realign_to
|
||||
//
|
||||
template<typename Result, typename Container, typename T>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::realign_to<Result, Container>::type realign_to(
|
||||
Container const& cont,
|
||||
T const& v
|
||||
)
|
||||
{
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::realign_to<Result, Container>::type
|
||||
realign_to(Container const& cont, T const& v) {
|
||||
return sprout::sub_copy(
|
||||
sprout::get_internal(sprout::fixed::realign_to<Result>(cont, v)),
|
||||
0,
|
||||
sprout::size(cont)
|
||||
);
|
||||
}
|
||||
|
||||
//
|
||||
// realign_to
|
||||
//
|
||||
template<typename Result, typename Container>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::realign_to<Result, Container>::type realign_to(
|
||||
Container const& cont
|
||||
)
|
||||
{
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::realign_to<Result, Container>::type
|
||||
realign_to(Container const& cont) {
|
||||
return sprout::sub_copy(
|
||||
sprout::get_internal(sprout::fixed::realign_to<Result>(cont)),
|
||||
0,
|
||||
|
|
|
@ -29,26 +29,17 @@ namespace sprout {
|
|||
// resize
|
||||
//
|
||||
template<std::size_t N, typename Container, typename T>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::resize<N, Container>::type resize(
|
||||
Container const& cont,
|
||||
T const& v
|
||||
)
|
||||
{
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::resize<N, Container>::type
|
||||
resize(Container const& cont, T const& v) {
|
||||
return sprout::sub_copy(
|
||||
sprout::get_internal(sprout::fixed::resize<N>(cont, v)),
|
||||
0,
|
||||
sprout::container_traits<typename sprout::fit::result_of::resize<N, Container>::type>::static_size
|
||||
);
|
||||
}
|
||||
|
||||
//
|
||||
// resize
|
||||
//
|
||||
template<std::size_t N, typename Container>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::resize<N, Container>::type resize(
|
||||
Container const& cont
|
||||
)
|
||||
{
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::resize<N, Container>::type
|
||||
resize(Container const& cont) {
|
||||
return sprout::sub_copy(
|
||||
sprout::get_internal(sprout::fixed::resize<N>(cont)),
|
||||
0,
|
||||
|
|
|
@ -29,26 +29,17 @@ namespace sprout {
|
|||
// resize_backward
|
||||
//
|
||||
template<std::size_t N, typename Container, typename T>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::resize_backward<N, Container>::type resize_backward(
|
||||
Container const& cont,
|
||||
T const& v
|
||||
)
|
||||
{
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::resize_backward<N, Container>::type
|
||||
resize_backward(Container const& cont, T const& v) {
|
||||
return sprout::sub_copy(
|
||||
sprout::get_internal(sprout::fixed::resize_backward<N>(cont, v)),
|
||||
0,
|
||||
sprout::container_traits<typename sprout::fit::result_of::resize_backward<N, Container>::type>::static_size
|
||||
);
|
||||
}
|
||||
|
||||
//
|
||||
// resize_backward
|
||||
//
|
||||
template<std::size_t N, typename Container>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::resize_backward<N, Container>::type resize_backward(
|
||||
Container const& cont
|
||||
)
|
||||
{
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::resize_backward<N, Container>::type
|
||||
resize_backward(Container const& cont) {
|
||||
return sprout::sub_copy(
|
||||
sprout::get_internal(sprout::fixed::resize_backward<N>(cont)),
|
||||
0,
|
||||
|
|
|
@ -29,28 +29,17 @@ namespace sprout {
|
|||
// set
|
||||
//
|
||||
template<typename Container, typename T>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::set<Container, T>::type set(
|
||||
Container const& cont,
|
||||
typename sprout::container_traits<Container>::const_iterator pos,
|
||||
T const& v
|
||||
)
|
||||
{
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::set<Container, T>::type
|
||||
set(Container const& cont, typename sprout::container_traits<Container>::const_iterator pos, T const& v) {
|
||||
return sprout::sub_copy(
|
||||
sprout::get_internal(sprout::fixed::set(cont, pos, v)),
|
||||
sprout::internal_begin_offset(cont),
|
||||
sprout::internal_end_offset(cont)
|
||||
);
|
||||
}
|
||||
//
|
||||
// set
|
||||
//
|
||||
template<typename Container, typename T>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::set<Container, T>::type set(
|
||||
Container const& cont,
|
||||
typename sprout::container_traits<Container>::difference_type pos,
|
||||
T const& v
|
||||
)
|
||||
{
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::set<Container, T>::type
|
||||
set(Container const& cont, typename sprout::container_traits<Container>::difference_type pos, T const& v) {
|
||||
return sprout::sub_copy(
|
||||
sprout::get_internal(sprout::fixed::set(cont, pos, v)),
|
||||
sprout::internal_begin_offset(cont),
|
||||
|
|
|
@ -27,9 +27,9 @@ namespace sprout {
|
|||
|
||||
namespace detail {
|
||||
template<typename Result, typename Container, typename Input, sprout::index_t... Indexes>
|
||||
inline SPROUT_CONSTEXPR Result append_impl(
|
||||
Container const& cont,
|
||||
sprout::index_tuple<Indexes...>,
|
||||
inline SPROUT_CONSTEXPR Result
|
||||
append_impl(
|
||||
Container const& cont, sprout::index_tuple<Indexes...>,
|
||||
typename sprout::container_traits<Container>::difference_type pos,
|
||||
typename sprout::container_traits<Container>::difference_type size,
|
||||
Input const& input
|
||||
|
@ -54,33 +54,36 @@ namespace sprout {
|
|||
// append
|
||||
//
|
||||
template<typename Container, typename Input>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::result_of::append<Container, Input>::type append(
|
||||
Container const& cont,
|
||||
typename sprout::container_traits<Container>::const_iterator pos,
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::result_of::append<Container, Input>::type
|
||||
append(
|
||||
Container const& cont, typename sprout::container_traits<Container>::const_iterator pos,
|
||||
Input const& input
|
||||
)
|
||||
{
|
||||
return sprout::fixed::detail::append_impl<typename sprout::fixed::result_of::append<Container, Input>::type>(
|
||||
cont,
|
||||
sprout::index_range<0, sprout::container_traits<typename sprout::fixed::result_of::append<Container, Input>::type>::static_size>::make(),
|
||||
sprout::index_range<
|
||||
0,
|
||||
sprout::container_traits<typename sprout::fixed::result_of::append<Container, Input>::type>::static_size
|
||||
>::make(),
|
||||
NS_SSCRISK_CEL_OR_SPROUT::distance(sprout::internal_begin(cont), pos),
|
||||
sprout::size(input),
|
||||
input
|
||||
);
|
||||
}
|
||||
//
|
||||
// append
|
||||
//
|
||||
template<typename Container, typename Input>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::result_of::append<Container, Input>::type append(
|
||||
Container const& cont,
|
||||
typename sprout::container_traits<Container>::difference_type pos,
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::result_of::append<Container, Input>::type
|
||||
append(
|
||||
Container const& cont, typename sprout::container_traits<Container>::difference_type pos,
|
||||
Input const& input
|
||||
)
|
||||
{
|
||||
return sprout::fixed::detail::append_impl<typename sprout::fixed::result_of::append<Container, Input>::type>(
|
||||
cont,
|
||||
sprout::index_range<0, sprout::container_traits<typename sprout::fixed::result_of::append<Container, Input>::type>::static_size>::make(),
|
||||
sprout::index_range<
|
||||
0,
|
||||
sprout::container_traits<typename sprout::fixed::result_of::append<Container, Input>::type>::static_size
|
||||
>::make(),
|
||||
NS_SSCRISK_CEL_OR_SPROUT::distance(sprout::internal_begin(cont), sprout::next(sprout::begin(cont), pos)),
|
||||
sprout::size(input),
|
||||
input
|
||||
|
|
|
@ -24,14 +24,14 @@ namespace sprout {
|
|||
// append_back
|
||||
//
|
||||
template<typename Container, typename Input>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::result_of::append_back<Container, Input>::type append_back(
|
||||
Container const& cont,
|
||||
Input const& input
|
||||
)
|
||||
{
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::result_of::append_back<Container, Input>::type
|
||||
append_back(Container const& cont, Input const& input) {
|
||||
return sprout::fixed::detail::append_impl<typename sprout::fixed::result_of::append_back<Container, Input>::type>(
|
||||
cont,
|
||||
sprout::index_range<0, sprout::container_traits<typename sprout::fixed::result_of::append_back<Container, Input>::type>::static_size>::make(),
|
||||
sprout::index_range<
|
||||
0,
|
||||
sprout::container_traits<typename sprout::fixed::result_of::append_back<Container, Input>::type>::static_size
|
||||
>::make(),
|
||||
sprout::internal_end_offset(cont),
|
||||
sprout::size(input),
|
||||
input
|
||||
|
|
|
@ -24,14 +24,14 @@ namespace sprout {
|
|||
// append_front
|
||||
//
|
||||
template<typename Container, typename Input>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::result_of::append_front<Container, Input>::type append_front(
|
||||
Container const& cont,
|
||||
Input const& input
|
||||
)
|
||||
{
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::result_of::append_front<Container, Input>::type
|
||||
append_front(Container const& cont, Input const& input) {
|
||||
return sprout::fixed::detail::append_impl<typename sprout::fixed::result_of::append_front<Container, Input>::type>(
|
||||
cont,
|
||||
sprout::index_range<0, sprout::container_traits<typename sprout::fixed::result_of::append_front<Container, Input>::type>::static_size>::make(),
|
||||
sprout::index_range<
|
||||
0,
|
||||
sprout::container_traits<typename sprout::fixed::result_of::append_front<Container, Input>::type>::static_size
|
||||
>::make(),
|
||||
sprout::internal_begin_offset(cont),
|
||||
sprout::size(input),
|
||||
input
|
||||
|
|
|
@ -28,9 +28,9 @@ namespace sprout {
|
|||
|
||||
namespace detail {
|
||||
template<typename Result, typename Container, sprout::index_t... Indexes>
|
||||
inline SPROUT_CONSTEXPR Result erase_impl(
|
||||
Container const& cont,
|
||||
sprout::index_tuple<Indexes...>,
|
||||
inline SPROUT_CONSTEXPR Result
|
||||
erase_impl(
|
||||
Container const& cont, sprout::index_tuple<Indexes...>,
|
||||
typename sprout::container_traits<Container>::difference_type pos
|
||||
)
|
||||
{
|
||||
|
@ -51,14 +51,14 @@ namespace sprout {
|
|||
// erase
|
||||
//
|
||||
template<typename Container>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::result_of::erase<Container>::type erase(
|
||||
Container const& cont,
|
||||
typename sprout::container_traits<Container>::const_iterator pos
|
||||
)
|
||||
{
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::result_of::erase<Container>::type
|
||||
erase(Container const& cont, typename sprout::container_traits<Container>::const_iterator pos) {
|
||||
return sprout::fixed::detail::erase_impl<typename sprout::fixed::result_of::erase<Container>::type>(
|
||||
cont,
|
||||
sprout::index_range<0, sprout::container_traits<typename sprout::fixed::result_of::erase<Container>::type>::static_size>::make(),
|
||||
sprout::index_range<
|
||||
0,
|
||||
sprout::container_traits<typename sprout::fixed::result_of::erase<Container>::type>::static_size
|
||||
>::make(),
|
||||
NS_SSCRISK_CEL_OR_SPROUT::distance(sprout::internal_begin(cont), pos)
|
||||
);
|
||||
}
|
||||
|
@ -66,14 +66,14 @@ namespace sprout {
|
|||
// erase
|
||||
//
|
||||
template<typename Container>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::result_of::erase<Container>::type erase(
|
||||
Container const& cont,
|
||||
typename sprout::container_traits<Container>::difference_type pos
|
||||
)
|
||||
{
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::result_of::erase<Container>::type
|
||||
erase(Container const& cont, typename sprout::container_traits<Container>::difference_type pos) {
|
||||
return sprout::fixed::detail::erase_impl<typename sprout::fixed::result_of::erase<Container>::type>(
|
||||
cont,
|
||||
sprout::index_range<0, sprout::container_traits<typename sprout::fixed::result_of::erase<Container>::type>::static_size>::make(),
|
||||
sprout::index_range<
|
||||
0,
|
||||
sprout::container_traits<typename sprout::fixed::result_of::erase<Container>::type>::static_size
|
||||
>::make(),
|
||||
NS_SSCRISK_CEL_OR_SPROUT::distance(sprout::internal_begin(cont), sprout::next(sprout::begin(cont), pos))
|
||||
);
|
||||
}
|
||||
|
|
|
@ -29,9 +29,9 @@ namespace sprout {
|
|||
|
||||
namespace detail {
|
||||
template<std::size_t N, typename Result, typename Container, sprout::index_t... Indexes>
|
||||
inline SPROUT_CONSTEXPR Result erase_n_impl(
|
||||
Container const& cont,
|
||||
sprout::index_tuple<Indexes...>,
|
||||
inline SPROUT_CONSTEXPR Result
|
||||
erase_n_impl(
|
||||
Container const& cont, sprout::index_tuple<Indexes...>,
|
||||
typename sprout::container_traits<Container>::difference_type pos
|
||||
)
|
||||
{
|
||||
|
@ -52,29 +52,26 @@ namespace sprout {
|
|||
// erase_n
|
||||
//
|
||||
template<std::size_t N, typename Container>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::result_of::erase_n<N, Container>::type erase_n(
|
||||
Container const& cont,
|
||||
typename sprout::container_traits<Container>::const_iterator pos
|
||||
)
|
||||
{
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::result_of::erase_n<N, Container>::type
|
||||
erase_n(Container const& cont, typename sprout::container_traits<Container>::const_iterator pos) {
|
||||
return sprout::fixed::detail::erase_n_impl<N, typename sprout::fixed::result_of::erase_n<N, Container>::type>(
|
||||
cont,
|
||||
sprout::index_range<0, sprout::container_traits<typename sprout::fixed::result_of::erase_n<N, Container>::type>::static_size>::make(),
|
||||
sprout::index_range<
|
||||
0,
|
||||
sprout::container_traits<typename sprout::fixed::result_of::erase_n<N, Container>::type>::static_size
|
||||
>::make(),
|
||||
NS_SSCRISK_CEL_OR_SPROUT::distance(sprout::internal_begin(cont), pos)
|
||||
);
|
||||
}
|
||||
//
|
||||
// erase_n
|
||||
//
|
||||
template<std::size_t N, typename Container>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::result_of::erase_n<N, Container>::type erase_n(
|
||||
Container const& cont,
|
||||
typename sprout::container_traits<Container>::difference_type pos
|
||||
)
|
||||
{
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::result_of::erase_n<N, Container>::type
|
||||
erase_n(Container const& cont, typename sprout::container_traits<Container>::difference_type pos) {
|
||||
return sprout::fixed::detail::erase_n_impl<N, typename sprout::fixed::result_of::erase_n<N, Container>::type>(
|
||||
cont,
|
||||
sprout::index_range<0, sprout::container_traits<typename sprout::fixed::result_of::erase_n<N, Container>::type>::static_size>::make(),
|
||||
sprout::index_range<
|
||||
0,
|
||||
sprout::container_traits<typename sprout::fixed::result_of::erase_n<N, Container>::type>::static_size
|
||||
>::make(),
|
||||
NS_SSCRISK_CEL_OR_SPROUT::distance(sprout::internal_begin(cont), sprout::next(sprout::begin(cont), pos))
|
||||
);
|
||||
}
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue