SpECTRE  v2026.04.01
Loading...
Searching...
No Matches
tt::is_iterable< T, typename > Struct Template Reference

Check if type T has a begin() and end() function. More...

#include <IsIterable.hpp>

Detailed Description

template<typename T, typename = std::void_t<>>
struct tt::is_iterable< T, typename >

Check if type T has a begin() and end() function.

Details

Given a type T inherits from std::true_type if T has member functions begin() and end(), otherwise inherits from std::false_type

Usage

For any type T

using result = tt::is_iterable<T>;
Check if type T has a begin() and end() function.
Definition IsIterable.hpp:40

Returns: std::bool_constant

Semantics: If T has member function begin() and end() then

typename result::type = std::true_type;

otherwise

typename result::type = std::false_type;

Example

"Failed testing type trait is_iterable");
"Failed testing type trait is_iterable");
"Failed testing type trait is_iterable");
"Failed testing type trait is_iterable");
Template Parameters
Tthe type to check

The documentation for this struct was generated from the following file:
  • src/Utilities/TypeTraits/IsIterable.hpp