24#if defined(__cpp_lib_format)
58 template <std::ranges::sized_range T>
65 template <
class U =
typename L::inner_value_type>
66 requires std::assignable_from<U&, const char*>
70 [[nodiscard]]
bool empty()
const;
80 template <std::ranges::input_range T>
84 template <
class U =
typename L::inner_value_type>
85 requires std::assignable_from<U&, const char*>
88 template <std::ranges::input_range T>
92 template <
class U =
typename L::inner_value_type>
93 requires std::assignable_from<U&, const char*>
101 L* p_layout =
nullptr;
108 template <
typename Layout,
template <
typename>
typename TQual,
template <
typename>
typename UQual>
109 struct basic_common_reference<
sparrow::variable_size_binary_reference<Layout>, std::string, TQual, UQual>
114 template <
typename Layout,
template <
typename>
typename TQual,
template <
class>
class UQual>
120 template <
typename Layout,
template <
typename>
typename TQual,
template <
typename>
typename UQual>
121 struct basic_common_reference<
sparrow::variable_size_binary_reference<Layout>, std::vector<std::byte>, TQual, UQual>
123 using type = std::vector<std::byte>;
126 template <
typename Layout,
template <
typename>
typename TQual,
template <
class>
class UQual>
129 using type = std::vector<std::byte>;
147 template <std::ranges::sized_range T>
151 p_layout->assign(std::forward<T>(rhs), m_index);
152 p_layout->get_arrow_proxy().update_buffers();
158 requires std::assignable_from<U&, const char*>
161 return *
this = std::string_view(rhs);
167 return static_cast<size_type>(offset(m_index + 1) - offset(m_index));
179 return iterator(p_layout->data(uoffset(m_index)));
185 return iterator(p_layout->data(uoffset(m_index + 1)));
213 template <std::ranges::input_range T>
217 return std::equal(
cbegin(),
cend(), std::cbegin(rhs), std::cend(rhs));
222 requires std::assignable_from<U&, const char*>
229 template <std::ranges::input_range T>
233 return lexicographical_compare_three_way(*
this, rhs);
238 requires std::assignable_from<U&, const char*>
245 auto variable_size_binary_reference<L>::offset(size_type index)
const -> offset_type
247 return *(p_layout->offset(index));
251 auto variable_size_binary_reference<L>::uoffset(size_type index)
const -> size_type
253 return static_cast<size_type
>(offset(index));
257#if defined(__cpp_lib_format)
258template <
typename Layout>
259struct std::formatter<
sparrow::variable_size_binary_reference<Layout>>
261 constexpr auto parse(std::format_parse_context& ctx)
266 auto format(
const sparrow::variable_size_binary_reference<Layout>& ref, std::format_context& ctx)
const
271 [&ctx](
const auto& value)
273 std::format_to(ctx.out(),
"{}, ", value);
277 return std::format_to(ctx.out(),
"{}>", *std::prev(ref.
cend()));
281template <
typename Layout>
284 os << std::format(
"{}", value);
Implementation of reference to inner type used for layout L.
const_iterator cbegin() const
std::ptrdiff_t difference_type
typename array_type::size_type size_type
variable_size_binary_reference(L *layout, size_type index)
typename array_type::data_iterator iterator
typename array_type::inner_const_reference const_reference
auto operator<=>(const T &rhs) const
auto operator<=>(const char *rhs) const
variable_size_binary_reference(variable_size_binary_reference &&)=default
bool operator==(const T &rhs) const
bool operator==(const char *rhs) const
variable_size_binary_reference< array_type > self_type
typename array_type::const_data_iterator const_iterator
typename array_type::inner_value_type value_type
typename array_type::offset_type offset_type
variable_size_binary_reference(const variable_size_binary_reference &)=default
self_type & operator=(T &&rhs)
const_iterator end() const
const_iterator cend() const
typename array_type::inner_reference reference
const_iterator begin() const
self_type & operator=(const char *rhs)
Matches range types From whose elements are convertible to elements of range type To.
constexpr std::compare_three_way_result_t< typename cloning_ptr< T1 >::pointer, typename cloning_ptr< T2 >::pointer > operator<=>(const cloning_ptr< T1 > &lhs, const cloning_ptr< T2 > &rhs) noexcept
SPARROW_API bool operator==(const array &lhs, const array &rhs)
Compares the content of two arrays.
constexpr InputIt next(InputIt it, Distance n)
std::ostream & operator<<(std::ostream &os, const sparrow::nullval_t &)
std::vector< std::byte > type
std::vector< std::byte > type