tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
empty.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSL-1.0
2
3#ifndef TETL_ITERATOR_EMPTY_HPP
4#define TETL_ITERATOR_EMPTY_HPP
5
8
9namespace etl {
10
13
14template <typename C>
15constexpr auto empty(C const& c) noexcept(noexcept(c.empty())) -> decltype(c.empty())
16{
17 return c.empty();
18}
19
22template <typename T, size_t N>
23constexpr auto empty(T (&array)[N]) noexcept -> bool
24{
26 return false;
27}
28
29} // namespace etl
30
31#endif // TETL_ITERATOR_EMPTY_HPP
constexpr auto empty(C const &c) noexcept(noexcept(c.empty())) -> decltype(c.empty())
Returns whether the given container is empty.
Definition empty.hpp:15
Definition adjacent_find.hpp:8
constexpr auto ignore_unused(Types &&...) -> void
Explicitly ignore arguments or variables.
Definition ignore_unused.hpp:17
A container that encapsulates fixed size arrays.
Definition array.hpp:48