17#if defined(__cpp_lib_format)
53 explicit operator
float() const
55 explicit operator
double() const
57 explicit operator
long double() const
60 [[nodiscard]] explicit operator
std::
string() const
68 [[nodiscard]]
int scale() const;
72 L* p_layout =
nullptr;
90 p_layout->assign(std::forward<value_type>(rhs), m_index);
97 p_layout->assign(rhs, m_index);
101 template <
typename L>
108 template <
typename L>
115 template <
typename L>
118 return value() == rhs;
121 template <
typename L>
124 return value() <=> rhs;
127 template <
typename L>
130 return static_cast<const L*
>(p_layout)->
value(m_index);
133 template <
typename L>
136 return value().storage();
139 template <
typename L>
142 return value().scale();
145 template <
typename L>
149 return static_cast<float>(
value());
152 template <
typename L>
156 return static_cast<double>(
value());
159 template <
typename L>
163 return static_cast<long double>(
value());
167#if defined(__cpp_lib_format)
170struct std::formatter<
sparrow::decimal_reference<L>>
172 constexpr auto parse(std::format_parse_context& ctx)
177 auto format(
const sparrow::decimal_reference<L>& ref, std::format_context& ctx)
const
179 const auto& value = ref.
value();
180 return std::format_to(ctx.out(),
"{}", value);
185inline std::ostream&
operator<<(std::ostream& os,
const sparrow::decimal_reference<L>& value)
187 os << std::format(
"{}", value);
decimal_reference(decimal_reference &&) noexcept=default
auto operator<=>(const value_type &rhs) const
value_type::integer_type storage() const
self_type & operator=(self_type &&rhs)
const_reference value() const
typename array_type::inner_value_type value_type
decimal_reference(const decimal_reference &)=default
decimal_reference< array_type > self_type
bool operator==(const value_type &rhs) const
typename array_type::inner_reference reference
typename array_type::size_type size_type
decimal_reference(L *layout, size_type index)
typename array_type::inner_const_reference const_reference
std::ptrdiff_t difference_type
constexpr bool is_int_placeholder_v
std::ostream & operator<<(std::ostream &os, const sparrow::nullval_t &)