Arene Base
Fundamental Utilities For Safety Critical C++
Loading...
Searching...
No Matches
arene::base::ranges::is_borrowed_range< Rng > Class Template Reference

Trait which determins if a type is a borrowed range. More...

Inheritance diagram for arene::base::ranges::is_borrowed_range< Rng >:
Inheritance graph

Additional Inherited Members

- Public Types inherited from std::integral_constant< bool, is_borrowed_range_v< Rng > >
using type
 The type of this class.
 
using value_type
 The type of the value.
 
- Public Member Functions inherited from std::integral_constant< bool, is_borrowed_range_v< Rng > >
constexpr operator value_type () const noexcept
 Implicit conversion to Type.
 
constexpr auto operator() () const noexcept -> value_type
 Nullary function call operator.
 
- Static Public Attributes inherited from std::integral_constant< bool, is_borrowed_range_v< Rng > >
static constexpr value_type value
 The constant.
 

Detailed Description

template<typename Rng>
class arene::base::ranges::is_borrowed_range< Rng >

Trait which determins if a type is a borrowed range.

Template Parameters
RngThe type to check.

A borrowed range is a range whose iterators remain valid even after the lifetime of the reference to the range object ends, and is thus safe to use as an input to range-based algorithms which return iterators or other references to the content in the range.

A type is considered a borrowed range if and only if both of the following conditions are true:

  1. is_range<Rng> is satisfied
  2. Either std::is_lvalue_reference<Rng> is satisfied or enable_borrowed_range<Rng> is specialized to be true

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