VCCC  2024.05
VisualCamp Common C++ library
projected.hpp
Go to the documentation of this file.
1 //
2 // Created by cosge on 2023-12-29.
3 //
4 
5 #ifndef VCCC_ITERATOR_PROJECTED_HPP
6 #define VCCC_ITERATOR_PROJECTED_HPP
7 
9 
18 
19 namespace vccc {
20 namespace detail {
21 
23 struct projected_impl_difference_type {
24  using difference_type = iter_difference_t<I>;
25 };
26 template<typename I>
27 struct projected_impl_difference_type<I, false> {};
28 
29 template<
30  typename I,
31  typename Proj,
32  bool = conjunction<
33  indirectly_readable<I>,
34  indirectly_regular_unary_invocable<Proj, I>
35  >::value /* true */
36 >
37 struct projected_impl {
38  struct type : projected_impl_difference_type<I> {
39  using value_type = remove_cvref_t<indirect_result_t<Proj, I>>;
40 
41  indirect_result_t<Proj&, I> operator*() const;
42  };
43 };
44 
45 template<typename I, typename Proj>
46 struct projected_impl<I, Proj, false> {};
47 
48 } // namespace detail
49 
68 template<typename I, typename Proj>
69 using projected = typename detail::projected_impl<I, Proj>::type;
70 
72 template<typename I, typename Proj>
74 
77 
78 } // namespace vccc
79 
81 #endif // VCCC_ITERATOR_PROJECTED_HPP
typename detail::projected_impl< I, Proj >::type projected
Definition: projected.hpp:69
constexpr MatrixMulMatrix< E1, E2 > operator*(const MatrixBase< E1 > &lhs, const MatrixBase< E2 > &rhs)
Definition: matrix_mul_matrix.hpp:77
Definition: directory.h:12
constexpr VCCC_INLINE_OR_STATIC detail::element_niebloid< 1 > value
Definition: key_value.hpp:35
Definition: has_typename_type.hpp:18