mirror of
https://github.com/bolero-MURAKAMI/Sprout
synced 2025-08-03 12:49:50 +00:00
fix container_traits for array-like classes
fix coding style algorithm/
This commit is contained in:
parent
06f1933220
commit
0c00166c5f
123 changed files with 1608 additions and 2224 deletions
|
@ -4,6 +4,11 @@
|
|||
#include <iterator>
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/iterator/next.hpp>
|
||||
#include <sprout/adl/not_found.hpp>
|
||||
|
||||
namespace sprout_adl {
|
||||
sprout::adl_not_found iterator_distance(...);
|
||||
} // namespace sprout_adl
|
||||
|
||||
namespace sprout {
|
||||
namespace iterator_detail {
|
||||
|
@ -24,6 +29,7 @@ namespace sprout_iterator_detail {
|
|||
inline SPROUT_CONSTEXPR typename std::iterator_traits<InputIterator>::difference_type
|
||||
distance(InputIterator first, InputIterator last) {
|
||||
using sprout::iterator_detail::iterator_distance;
|
||||
using sprout_adl::iterator_distance;
|
||||
return iterator_distance(first, last);
|
||||
}
|
||||
} // namespace sprout_iterator_detail
|
||||
|
|
|
@ -4,6 +4,11 @@
|
|||
#include <iterator>
|
||||
#include <type_traits>
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/adl/not_found.hpp>
|
||||
|
||||
namespace sprout_adl {
|
||||
sprout::adl_not_found iterator_next(...);
|
||||
} // namespace sprout_adl
|
||||
|
||||
namespace sprout {
|
||||
namespace iterator_detail {
|
||||
|
@ -69,12 +74,14 @@ namespace sprout_iterator_detail {
|
|||
inline SPROUT_CONSTEXPR ForwardIterator
|
||||
next(ForwardIterator const& it) {
|
||||
using sprout::iterator_detail::iterator_next;
|
||||
using sprout_adl::iterator_next;
|
||||
return iterator_next(it);
|
||||
}
|
||||
template<typename ForwardIterator>
|
||||
inline SPROUT_CONSTEXPR ForwardIterator
|
||||
next(ForwardIterator const& it, typename std::iterator_traits<ForwardIterator>::difference_type n) {
|
||||
using sprout::iterator_detail::iterator_next;
|
||||
using sprout_adl::iterator_next;
|
||||
return iterator_next(it, n);
|
||||
}
|
||||
} // namespace sprout_iterator_detail
|
||||
|
|
|
@ -4,6 +4,11 @@
|
|||
#include <iterator>
|
||||
#include <type_traits>
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/adl/not_found.hpp>
|
||||
|
||||
namespace sprout_adl {
|
||||
sprout::adl_not_found iterator_prev(...);
|
||||
} // namespace sprout_adl
|
||||
|
||||
namespace sprout {
|
||||
namespace iterator_detail {
|
||||
|
@ -69,12 +74,14 @@ namespace sprout_iterator_detail {
|
|||
inline SPROUT_CONSTEXPR BidirectionalIterator
|
||||
prev(BidirectionalIterator const& it) {
|
||||
using sprout::iterator_detail::iterator_prev;
|
||||
using sprout_adl::iterator_prev;
|
||||
return iterator_prev(it);
|
||||
}
|
||||
template<typename BidirectionalIterator>
|
||||
inline SPROUT_CONSTEXPR BidirectionalIterator
|
||||
prev(BidirectionalIterator const& it, typename std::iterator_traits<BidirectionalIterator>::difference_type n) {
|
||||
using sprout::iterator_detail::iterator_prev;
|
||||
using sprout_adl::iterator_prev;
|
||||
return iterator_prev(it, n);
|
||||
}
|
||||
} // namespace sprout_iterator_detail
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue