mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2025-07-14 15:04:09 +00:00
add sprout::string_ref
support conversion array-like container iterator to pointer
This commit is contained in:
parent
fa1d769bdf
commit
1ef8a6a63b
64 changed files with 1570 additions and 254 deletions
|
@ -8,13 +8,14 @@
|
|||
#include <sprout/iterator/next.hpp>
|
||||
#include <sprout/iterator/prev.hpp>
|
||||
#include <sprout/iterator/distance.hpp>
|
||||
#include <sprout/iterator/detail/iterator_to_pointer.hpp>
|
||||
#include <sprout/utility/swap.hpp>
|
||||
|
||||
namespace sprout {
|
||||
//
|
||||
// ptr_index_iterator
|
||||
//
|
||||
template<typename T>
|
||||
template<typename T, bool ConvertibleToPointer = false>
|
||||
class ptr_index_iterator
|
||||
: public std::iterator<
|
||||
typename std::iterator_traits<T*>::iterator_category,
|
||||
|
@ -23,6 +24,11 @@ namespace sprout {
|
|||
typename std::iterator_traits<T*>::pointer,
|
||||
typename std::iterator_traits<T*>::reference
|
||||
>
|
||||
, public sprout::detail::iterator_to_pointer_base<
|
||||
sprout::ptr_index_iterator<T, ConvertibleToPointer>,
|
||||
typename std::iterator_traits<T*>::pointer,
|
||||
ConvertibleToPointer
|
||||
>
|
||||
{
|
||||
public:
|
||||
typedef T type;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue