Check if type T has a begin() and end() function.
More...
#include <IsIterable.hpp>
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
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
otherwise
Example
"Failed testing type trait is_iterable");
"Failed testing type trait is_iterable");
static_assert(tt::is_iterable_v<std::vector<double>>,
"Failed testing type trait is_iterable");
"Failed testing type trait is_iterable");
constexpr T & value(T &t)
Returns t.value() if t is a std::optional otherwise returns t.
Definition: OptionalHelpers.hpp:32
typename is_iterable< T >::type is_iterable_t
Definition: IsIterable.hpp:55
- Template Parameters
-
The documentation for this struct was generated from the following file:
- src/Utilities/TypeTraits/IsIterable.hpp