tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
boolean_testable.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_CONCEPTS_BOOLEAN_TESTABLE_HPP
5#define TETL_CONCEPTS_BOOLEAN_TESTABLE_HPP
6
7#include <etl/_concepts/convertible_to.hpp>
8#include <etl/_utility/forward.hpp>
9
10namespace etl {
11
12namespace detail {
13template <typename T>
14concept boolean_testable_impl = convertible_to<T, bool>;
15} // namespace detail
16
17/// \note Non-standard extension
18/// \headerfile etl/concepts.hpp
19/// \ingroup concepts
20template <typename T>
21concept boolean_testable = etl::detail::boolean_testable_impl<T> and requires(T&& t) {
22 { not etl::forward<T>(t) } -> etl::detail::boolean_testable_impl;
23};
24
25} // namespace etl
26
27#endif // TETL_CONCEPTS_BOOLEAN_TESTABLE_HPP
Definition adjacent_find.hpp:9