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
3#ifndef TETL_CONCEPTS_BOOLEAN_TESTABLE_HPP
4#define TETL_CONCEPTS_BOOLEAN_TESTABLE_HPP
5
8
9namespace etl {
10
11namespace detail {
12template <typename T>
13concept boolean_testable_impl = convertible_to<T, bool>;
14} // namespace detail
15
19template <typename T>
20concept boolean_testable = etl::detail::boolean_testable_impl<T> and requires(T&& t) {
21 { not etl::forward<T>(t) } -> etl::detail::boolean_testable_impl;
22};
23
24} // namespace etl
25
26#endif // TETL_CONCEPTS_BOOLEAN_TESTABLE_HPP
Definition boolean_testable.hpp:20
Definition adjacent_find.hpp:8
constexpr auto forward(remove_reference_t< T > &param) noexcept -> T &&
Forwards lvalues as either lvalues or as rvalues, depending on T. When t is a forwarding reference (a...
Definition forward.hpp:18