The class template
conjugated_accessor
is an
mdspan accessor policy
which upon access produces conjugate elements
. namespace std::linalg {
template<class NestedAccessor>
class conjugated_accessor {
public:
using element_type =
add_const_t<decltype(conj-if-needed(declval<NestedAccessor::element_type>()))>;
using reference = remove_const_t<element_type>;
using data_handle_type = typename NestedAccessor::data_handle_type;
using offset_policy = conjugated_accessor<NestedAccessor::offset_policy>;
constexpr conjugated_accessor() = default;
template<class OtherNestedAccessor>
explicit(!is_convertible_v<OtherNestedAccessor, NestedAccessor>>)
constexpr conjugated_accessor(const conjugated_accessor<OtherNestedAccessor>& other);
constexpr reference access(data_handle_type p, size_t i) const;
constexpr typename offset_policy::data_handle_type
offset(data_handle_type p, size_t i) const;
constexpr const Accessor& nested_accessor() const noexcept { return nested-accessor_; }
private:
NestedAccessor nested-accessor_{};
};
}