view: use auto return type for indexing
This commit is contained in:
parent
1123cfe409
commit
9704387fdc
5
view.hpp
5
view.hpp
@ -210,7 +210,7 @@ namespace util {
|
|||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////
|
||||||
constexpr value_type&
|
constexpr auto&
|
||||||
operator[] (size_t idx)& noexcept
|
operator[] (size_t idx)& noexcept
|
||||||
{
|
{
|
||||||
auto it = begin ();
|
auto it = begin ();
|
||||||
@ -219,7 +219,7 @@ namespace util {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------
|
//---------------------------------------------------------------------
|
||||||
constexpr const value_type&
|
constexpr auto&
|
||||||
operator[] (size_t idx) const& noexcept
|
operator[] (size_t idx) const& noexcept
|
||||||
{
|
{
|
||||||
auto it = begin ();
|
auto it = begin ();
|
||||||
@ -343,7 +343,6 @@ namespace util {
|
|||||||
view<CharT*>
|
view<CharT*>
|
||||||
make_view (std::basic_string<CharT,TraitsT,AllocT>&&) = delete;
|
make_view (std::basic_string<CharT,TraitsT,AllocT>&&) = delete;
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
template <typename IteratorA, typename IteratorB>
|
template <typename IteratorA, typename IteratorB>
|
||||||
constexpr bool
|
constexpr bool
|
||||||
|
Loading…
Reference in New Issue
Block a user