mirror of
https://github.com/bolero-MURAKAMI/Sprout
synced 2025-08-03 12:49:50 +00:00
add subscript_at function
This commit is contained in:
parent
8278a2642c
commit
0080332dd5
12 changed files with 341 additions and 54 deletions
|
@ -66,6 +66,16 @@ namespace sprout {
|
|||
SPROUT_CONSTEXPR typename sprout::container_traits<Container const>::reference
|
||||
back(Container const& cont);
|
||||
|
||||
//
|
||||
// subscript_at
|
||||
//
|
||||
template<typename Container>
|
||||
SPROUT_CONSTEXPR typename sprout::container_traits<Container>::reference
|
||||
subscript_at(Container& cont, typename sprout::container_traits<Container>::size_type i);
|
||||
template<typename Container>
|
||||
SPROUT_CONSTEXPR typename sprout::container_traits<Container const>::reference
|
||||
subscript_at(Container const& cont, typename sprout::container_traits<Container const>::size_type i);
|
||||
|
||||
//
|
||||
// at
|
||||
//
|
||||
|
@ -105,8 +115,21 @@ namespace sprout {
|
|||
template<typename Container>
|
||||
SPROUT_CONSTEXPR typename sprout::container_traits<Container const>::pointer
|
||||
data(Container const& cont);
|
||||
} // namespace sprout
|
||||
|
||||
//
|
||||
// range_index_check
|
||||
//
|
||||
template<typename Container>
|
||||
SPROUT_CONSTEXPR typename sprout::container_traits<Container const>::size_type
|
||||
range_index_check(Container const& cont, typename sprout::container_traits<Container const>::size_type i);
|
||||
|
||||
//
|
||||
// shrink_to_fit
|
||||
//
|
||||
template<typename Container>
|
||||
SPROUT_CXX14_CONSTEXPR void
|
||||
shrink_to_fit(Container&& cont);
|
||||
} // namespace sprout
|
||||
|
||||
#include <sprout/container/size.hpp>
|
||||
#include <sprout/container/empty.hpp>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue