tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
ranges_in_fun_result.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSL-1.0
2// SPDX-FileCopyrightText: Copyright (C) 2024 Tobias Hienzsch
3
4#ifndef TETL_ALGORITHM_RANGES_IN_FUN_RESULT_HPP
5#define TETL_ALGORITHM_RANGES_IN_FUN_RESULT_HPP
6
7#include <etl/_config/all.hpp>
8
9#include <etl/_concepts/convertible_to.hpp>
10#include <etl/_utility/move.hpp>
11
12namespace etl::ranges {
13
14/// \ingroup algorithm
15template <typename I, typename F>
17 template <typename I2, typename F2>
18 requires etl::convertible_to<I const&, I2> and etl::convertible_to<F const&, F2>
19 constexpr operator in_fun_result<I2, F2>() const&
20 {
21 return {in, fun};
22 }
23
24 template <typename I2, typename F2>
25 requires etl::convertible_to<I, I2> and etl::convertible_to<F, F2>
26 constexpr operator in_fun_result<I2, F2>() &&
27 {
28 return {etl::move(in), etl::move(fun)};
29 }
30
33};
34
35} // namespace etl::ranges
36
37#endif // TETL_ALGORITHM_RANGES_IN_FUN_RESULT_HPP
Definition ranges_in_fun_result.hpp:12
Definition adjacent_find.hpp:9
Definition ranges_in_fun_result.hpp:16
and etl::convertible_to< F const &, F2 > constexpr operator in_fun_result< I2, F2 >() const &
Definition ranges_in_fun_result.hpp:19
TETL_NO_UNIQUE_ADDRESS F fun
Definition ranges_in_fun_result.hpp:32
TETL_NO_UNIQUE_ADDRESS I in
Definition ranges_in_fun_result.hpp:31
and etl::convertible_to< F, F2 > constexpr operator in_fun_result< I2, F2 >() &&
Definition ranges_in_fun_result.hpp:26