VvyLw's Library

This documentation is automatically generated by online-judge-tools/verification-helper

View the Project on GitHub

:warning: C++/other/is_iterable.hpp

Code

#pragma once

#include <type_traits>
#include <concepts>

template <class T> concept is_iterable = requires(const T &a) {
    { std::begin(a) } -> std::same_as<typename std::remove_reference<decltype(std::begin(a))>::type>;
    { std::end(a) } -> std::same_as<typename std::remove_reference<decltype(std::end(a))>::type>;
};
#line 2 "C++/other/is_iterable.hpp"

#include <type_traits>
#include <concepts>

template <class T> concept is_iterable = requires(const T &a) {
    { std::begin(a) } -> std::same_as<typename std::remove_reference<decltype(std::begin(a))>::type>;
    { std::end(a) } -> std::same_as<typename std::remove_reference<decltype(std::end(a))>::type>;
};
Back to top page