tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
full.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSL-1.0
2// SPDX-FileCopyrightText: Copyright (C) 2021 Tobias Hienzsch
3
4#ifndef TETL_ITERATOR_FULL_HPP
5#define TETL_ITERATOR_FULL_HPP
6
7#include <etl/_cstddef/size_t.hpp>
8#include <etl/_utility/ignore_unused.hpp>
9
10namespace etl {
11
12/// \brief Returns whether the given container is full.
13/// \ingroup iterator
14template <typename C>
15constexpr auto full(C const& c) noexcept(noexcept(c.full())) -> decltype(c.full())
16{
17 return c.full();
18}
19
20/// \ingroup iterator
21template <typename T, size_t N>
22constexpr auto full(T (&array)[N]) noexcept -> bool
23{
24 etl::ignore_unused(&array);
25 return true;
26}
27
28} // namespace etl
29
30#endif // TETL_ITERATOR_FULL_HPP
constexpr auto full(C const &c) noexcept(noexcept(c.full())) -> decltype(c.full())
Returns whether the given container is full.
Definition full.hpp:15
constexpr auto full(T(&array)[N]) noexcept -> bool
Definition full.hpp:22
Definition adjacent_find.hpp:9