Skip to main content

free_range Concept

Concept satisfied when T provides begin() and end() only as functions found by argument-dependent lookup. More...

Definition​

template <class T>
concept micro_os_plus::micro_test_plus::detail::free_range = (not container_like<T>) and requires (const T& t) {
      requires std::input_or_output_iterator<decltype (begin (t))>;
      requires std::sentinel_for<decltype (end (t)), decltype (begin (t))>;
    }

Description​

Concept satisfied when T provides begin() and end() only as functions found by argument-dependent lookup.

Template Parameters
T

The type to be checked.

The free_range concept is satisfied when T has no begin() and end() members (see container_like), but calls of begin() and end() with a const T& argument are valid and return an iterator and its sentinel, as in a range-based for statement, which then uses them.

Definition at line 574 of file extension.h.

  template<class T>
  concept free_range = (not container_like<T>) and requires (const T& t) {
  requires std::input_or_output_iterator<decltype (begin (t))>;
  requires std::sentinel_for<decltype (end (t)), decltype (begin (t))>;
  }

Generated via doxygen2docusaurus 2.2.8 by Doxygen 1.18.0.