17#if defined(__cpp_lib_format)
55 [[nodiscard]] L::inner_value_type value()
const
57 return static_cast<const L*
>(p_layout)->value(m_index);
60 L* p_layout =
nullptr;
62#if defined(__cpp_lib_format)
63 friend std::formatter<timestamp_reference<L>>;
71 template <
typename Layout,
typename T,
template <
typename>
typename TQual,
template <
typename>
typename UQual>
77 template <
typename Layout,
typename T,
template <
typename>
typename TQual,
template <
class>
class UQual>
100 p_layout->assign(std::forward<value_type>(rhs), m_index);
104 template <
typename L>
107 p_layout->assign(rhs, m_index);
111 template <
typename L>
114 const auto& value =
static_cast<const L*
>(p_layout)->value(m_index);
118 template <
typename L>
121 return lexicographical_compare_three_way(*
this, rhs);
125#if defined(__cpp_lib_format)
128struct std::formatter<
sparrow::timestamp_reference<L>>
130 constexpr auto parse(std::format_parse_context& ctx)
135 auto format(
const sparrow::timestamp_reference<L>& ref, std::format_context& ctx)
const
137 const auto& value = ref.value();
138 return std::format_to(ctx.out(),
"{}", value);
145 os << std::format(
"{}", value);
Implementation of reference to inner type used for layout L.
timestamp_reference(L *layout, size_type index)
std::ptrdiff_t difference_type
timestamp_reference< self_type > self_type
bool operator==(const value_type &rhs) const
typename self_type::inner_value_type value_type
self_type & operator=(const value_type &rhs)
typename self_type::size_type size_type
typename self_type::inner_reference reference
timestamp_reference(const timestamp_reference &)=default
auto operator<=>(const value_type &rhs) const
timestamp_reference(timestamp_reference &&)=default
typename self_type::inner_const_reference const_reference
self_type & operator=(value_type &&rhs)
date::zoned_time< Duration, TimeZonePtr > timestamp
std::ostream & operator<<(std::ostream &stream, T n)