scnlib  0.2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
scn::detail::range_wrapper< Range > Class Template Reference

#include <range.h>

Public Types

using range_type = Range
 
using iterator = ranges::iterator_t< const Range >
 
using sentinel = ranges::sentinel_t< const Range >
 
using char_type = typename extract_char_type< iterator >::type
 
using return_type = remove_cvref_t< range_type >
 
using difference_type = ranges::range_difference_t< Range >
 

Public Member Functions

template<typename R , typename std::enable_if< std::is_same< remove_cvref_t< R >, return_type >::value >::type * = nullptr>
 range_wrapper (R &&r)
 
remove_cvref_t< range_typerange () const
 
remove_cvref_t< range_typeget_return ()
 
iterator begin () const noexcept
 
sentinel end () const noexcept(noexcept(ranges::end(std::declval< const Range & >())))
 
iterator advance (difference_type n=1) noexcept
 
template<typename R = Range, typename std::enable_if< ranges::sized_range< R >::value >::type * = nullptr>
void advance_to (iterator it) noexcept
 
iterator begin_underlying () const noexcept(noexcept(ranges::begin(std::declval< const Range & >())))
 
range_type range_underlying () const noexcept
 
template<typename R = Range, typename std::enable_if< ranges::contiguous_range< R >::value >::type * = nullptr>
auto data () const noexcept(noexcept(*std::declval< ranges::iterator_t< const R >>())) -> decltype(std::addressof(*std::declval< ranges::iterator_t< const R >>()))
 
template<typename R = Range, typename std::enable_if< ranges::sized_range< R >::value >::type * = nullptr>
auto size () const noexcept(noexcept(ranges::distance(std::declval< ranges::iterator_t< const R >>(), std::declval< ranges::sentinel_t< const R >>()))) -> decltype(ranges::distance(std::declval< ranges::iterator_t< const R >>(), std::declval< ranges::sentinel_t< const R >>()))
 
error reset_to_rollback_point ()
 
void set_rollback_point ()
 

Static Public Attributes

static constexpr bool is_direct = is_direct_impl<Range>::value
 
static constexpr bool is_contiguous
 
static constexpr bool provides_buffer_access
 

Detailed Description

template<typename Range>
class scn::detail::range_wrapper< Range >

Definition at line 100 of file range.h.

Member Typedef Documentation

template<typename Range>
using scn::detail::range_wrapper< Range >::char_type = typename extract_char_type<iterator>::type

Definition at line 105 of file range.h.

template<typename Range>
using scn::detail::range_wrapper< Range >::difference_type = ranges::range_difference_t<Range>

Definition at line 107 of file range.h.

template<typename Range>
using scn::detail::range_wrapper< Range >::iterator = ranges::iterator_t<const Range>

Definition at line 103 of file range.h.

template<typename Range>
using scn::detail::range_wrapper< Range >::range_type = Range

Definition at line 102 of file range.h.

template<typename Range>
using scn::detail::range_wrapper< Range >::return_type = remove_cvref_t<range_type>

Definition at line 106 of file range.h.

template<typename Range>
using scn::detail::range_wrapper< Range >::sentinel = ranges::sentinel_t<const Range>

Definition at line 104 of file range.h.

Constructor & Destructor Documentation

template<typename Range>
template<typename R , typename std::enable_if< std::is_same< remove_cvref_t< R >, return_type >::value >::type * = nullptr>
scn::detail::range_wrapper< Range >::range_wrapper ( R &&  r)
inline

Definition at line 113 of file range.h.

Member Function Documentation

template<typename Range>
iterator scn::detail::range_wrapper< Range >::advance ( difference_type  n = 1)
inlinenoexcept

Definition at line 139 of file range.h.

template<typename Range>
template<typename R = Range, typename std::enable_if< ranges::sized_range< R >::value >::type * = nullptr>
void scn::detail::range_wrapper< Range >::advance_to ( iterator  it)
inlinenoexcept

Definition at line 150 of file range.h.

template<typename Range>
iterator scn::detail::range_wrapper< Range >::begin ( ) const
inlinenoexcept

Definition at line 129 of file range.h.

template<typename Range>
iterator scn::detail::range_wrapper< Range >::begin_underlying ( ) const
inlinenoexcept

Definition at line 157 of file range.h.

template<typename Range>
template<typename R = Range, typename std::enable_if< ranges::contiguous_range< R >::value >::type * = nullptr>
auto scn::detail::range_wrapper< Range >::data ( ) const -> decltype(std::addressof( *std::declval<ranges::iterator_t<const R>>()))
inlinenoexcept

Definition at line 170 of file range.h.

template<typename Range>
sentinel scn::detail::range_wrapper< Range >::end ( ) const
inlinenoexcept

Definition at line 133 of file range.h.

template<typename Range>
remove_cvref_t<range_type> scn::detail::range_wrapper< Range >::get_return ( )
inline

Definition at line 123 of file range.h.

template<typename Range>
remove_cvref_t<range_type> scn::detail::range_wrapper< Range >::range ( ) const
inline

Definition at line 118 of file range.h.

template<typename Range>
range_type scn::detail::range_wrapper< Range >::range_underlying ( ) const
inlinenoexcept

Definition at line 162 of file range.h.

template<typename Range>
error scn::detail::range_wrapper< Range >::reset_to_rollback_point ( )
inline

Definition at line 190 of file range.h.

template<typename Range>
void scn::detail::range_wrapper< Range >::set_rollback_point ( )
inline

Definition at line 201 of file range.h.

template<typename Range>
template<typename R = Range, typename std::enable_if< ranges::sized_range< R >::value >::type * = nullptr>
auto scn::detail::range_wrapper< Range >::size ( ) const -> decltype(ranges::distance( std::declval<ranges::iterator_t<const R>>(), std::declval<ranges::sentinel_t<const R>>()))
inlinenoexcept

Definition at line 180 of file range.h.

Member Data Documentation

template<typename Range>
constexpr bool scn::detail::range_wrapper< Range >::is_contiguous
static
Initial value:
=
is_contiguous_impl<Range>::value

Definition at line 209 of file range.h.

template<typename Range>
constexpr bool scn::detail::range_wrapper< Range >::is_direct = is_direct_impl<Range>::value
static

Definition at line 207 of file range.h.

template<typename Range>
constexpr bool scn::detail::range_wrapper< Range >::provides_buffer_access
static
Initial value:
=
provides_buffer_access_impl<Range>::value

Definition at line 212 of file range.h.


The documentation for this class was generated from the following file: