25#if defined(__cpp_lib_format)
55 template <std::ranges::sized_range T>
69 template <std::ranges::input_range T>
73 template <std::ranges::input_range T>
81 L* p_layout =
nullptr;
88 template <
typename Layout,
template <
typename>
typename TQual,
template <
typename>
typename UQual>
89 struct basic_common_reference<
sparrow::fixed_width_binary_reference<Layout>, std::vector<sparrow::byte_t>, TQual, UQual>
91 using type = std::vector<sparrow::byte_t>;
94 template <
typename Layout,
template <
typename>
typename TQual,
template <
class>
class UQual>
97 using type = std::vector<sparrow::byte_t>;
115 template <std::ranges::sized_range T>
120 p_layout->assign(std::forward<T>(rhs), m_index);
121 p_layout->get_arrow_proxy().update_buffers();
128 return p_layout->m_element_size;
134 return iterator(p_layout->data(offset(m_index)));
140 return iterator(p_layout->data(offset(m_index + 1)));
168 template <std::ranges::input_range T>
172 return std::equal(
cbegin(),
cend(), std::cbegin(rhs), std::cend(rhs));
176 template <std::ranges::input_range T>
180 return lexicographical_compare_three_way(*
this, rhs);
184 auto fixed_width_binary_reference<L>::offset(size_type index)
const -> size_type
186 return p_layout->m_element_size * index;
190#if defined(__cpp_lib_format)
192template <
typename Layout>
193struct std::formatter<
sparrow::fixed_width_binary_reference<Layout>>
195 constexpr auto parse(std::format_parse_context& ctx)
200 auto format(
const sparrow::fixed_width_binary_reference<Layout>& ref, std::format_context& ctx)
const
205 [&ctx](
const auto& value)
207 std::format_to(ctx.out(),
"{}, ", value);
211 return std::format_to(ctx.out(),
"{}>", *std::prev(ref.
cend()));
215template <
typename Layout>
218 os << std::format(
"{}", value);
Implementation of reference to inner type used for layout L.
typename array_type::inner_value_type value_type
const_iterator cbegin() const
fixed_width_binary_reference(L *layout, size_type index)
bool operator==(const T &rhs) const
const_iterator end() const
const_iterator begin() const
typename array_type::inner_reference reference
fixed_width_binary_reference(const fixed_width_binary_reference &)=default
fixed_width_binary_reference< array_type > self_type
std::ptrdiff_t difference_type
fixed_width_binary_reference(fixed_width_binary_reference &&)=default
self_type & operator=(T &&rhs)
typename array_type::data_iterator iterator
typename array_type::const_data_iterator const_iterator
typename array_type::size_type size_type
auto operator<=>(const T &rhs) const
typename array_type::inner_const_reference const_reference
const_iterator cend() const
Matches range types From whose elements are convertible to elements of range type To.
#define SPARROW_ASSERT_TRUE(expr__)
constexpr InputIt next(InputIt it, Distance n)
std::ostream & operator<<(std::ostream &stream, T n)
std::vector< sparrow::byte_t > type
std::vector< sparrow::byte_t > type