mirror of
https://github.com/bolero-MURAKAMI/Sprout
synced 2025-08-03 12:49:50 +00:00
add non-member function nth(), index_of()
This commit is contained in:
parent
6a9cda9d4c
commit
c3636c10d2
7 changed files with 390 additions and 6 deletions
|
@ -76,6 +76,26 @@ namespace sprout {
|
|||
SPROUT_CONSTEXPR typename sprout::container_traits<Container const>::reference
|
||||
at(Container const& cont, typename sprout::container_traits<Container const>::size_type i);
|
||||
|
||||
//
|
||||
// nth
|
||||
//
|
||||
template<typename Container>
|
||||
SPROUT_CONSTEXPR typename sprout::container_traits<Container>::iterator
|
||||
nth(Container& cont, typename sprout::container_traits<Container>::size_type i);
|
||||
template<typename Container>
|
||||
SPROUT_CONSTEXPR typename sprout::container_traits<Container const>::iterator
|
||||
nth(Container const& cont, typename sprout::container_traits<Container const>::size_type i);
|
||||
|
||||
//
|
||||
// index_of
|
||||
//
|
||||
template<typename Container>
|
||||
SPROUT_CONSTEXPR typename sprout::container_traits<Container>::size_type
|
||||
index_of(Container& cont, typename sprout::container_traits<Container>::iterator p);
|
||||
template<typename Container>
|
||||
SPROUT_CONSTEXPR typename sprout::container_traits<Container const>::size_type
|
||||
index_of(Container const& cont, typename sprout::container_traits<Container const>::iterator p);
|
||||
|
||||
//
|
||||
// data
|
||||
//
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue