micro-test-plus 6.0.0
µTest++ Testing Framework
Loading...
Searching...
No Matches
micro_os_plus::micro_test_plus::detail::free_range Concept Reference

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

#include <extension.h>

Concept definition

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))>;
}
Concept satisfied when T provides both begin() and end() member functions returning an iterator and i...
Definition extension.h:532
Concept satisfied when T provides begin() and end() only as functions found by argument-dependent loo...
Definition extension.h:574

Detailed Description

Template Parameters
TThe 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.