10 #ifdef NUI_HAS_STD_RANGES
16 template <
typename ObservedValue>
24 template <
typename ObservedValueT>
25 requires std::is_same_v<std::decay_t<ObservedValueT>, std::decay_t<ObservedValueT>>
32 return observedValue_;
35 requires(!std::is_const_v<ObservedValue>)
37 return observedValue_;
44 template <
typename CopyableRangeLike,
typename... ObservedValues>
49 : observedValues_{std::move(observedValues)}
53 requires(
sizeof...(ObservedValues) == 0)
69 return observedValues_;
73 return observedValues_;
81 template <
typename ObservedValue>
88 template <
typename ObservedValue>
90 ObservedRange<const ObservedValue>
range(ObservedValue
const& observedValues)
92 return ObservedRange<const ObservedValue>{observedValues};
95 template <
typename ContainerT,
typename... Observed>
96 UnoptimizedRange<IteratorAccessor<ContainerT const>, std::decay_t<Detail::ObservedAddReference_t<Observed>>...>
101 std::decay_t<Detail::ObservedAddReference_t<Observed>>...>{
107 template <
typename ContainerT,
typename... Observed>
108 UnoptimizedRange<IteratorAccessor<ContainerT>, std::decay_t<Detail::ObservedAddReference_t<Observed>>...>
113 std::decay_t<Detail::ObservedAddReference_t<Observed>>...>{
119 template <
typename ContainerT>
127 template <
typename ContainerT>
135 #ifdef NUI_HAS_STD_RANGES
136 template <
typename T,
typename... Observed>
138 std::ranges::subrange<std::ranges::iterator_t<T const>>,
139 std::decay_t<Detail::ObservedAddReference_t<Observed>>...>
140 range(T
const& container, Observed&&... observed)
142 return UnoptimizedRange<
143 std::ranges::subrange<std::ranges::iterator_t<T const>>,
144 std::decay_t<Detail::ObservedAddReference_t<Observed>>...>{
146 std::ranges::subrange<std::ranges::iterator_t<T const>>{
147 std::ranges::begin(container), std::ranges::end(container)},
152 template <
typename ContainerT>
155 return std::pair<ObservedRange<Observed<ContainerT>>, std::decay_t<decltype(
function)>>{
157 std::forward<std::decay_t<decltype(
function)>>(
function),
161 template <
typename ContainerT>
164 return std::pair<ObservedRange<Observed<ContainerT>>, std::decay_t<decltype(
function)>>{
166 std::forward<std::decay_t<decltype(
function)>>(
function),
Definition: iterator_accessor.hpp:9
constexpr auto map(auto &&function) const
Definition: range.hpp:153
Detail::ObservedAddMutableReference_t< ObservedValue > underlying() requires(!std
Definition: range.hpp:34
static constexpr bool isRandomAccess
Definition: range.hpp:22
requires constexpr std::is_same_v< std::decay_t< ObservedValueT >, std::decay_t< ObservedValueT > > ObservedRange(ObservedValueT &&observedValues)
Definition: range.hpp:26
Detail::ObservedAddReference_t< ObservedValue > underlying() const
Definition: range.hpp:30
ObservedValue ObservedType
Definition: range.hpp:20
Definition: observed_value_combinator.hpp:160
Definition: observed_value.hpp:1202
CopyableRangeLike rangeLike_
Definition: range.hpp:78
UnoptimizedRange(ObservedValueCombinator< ObservedValues... > &&observedValues, CopyableRangeLike &&rangeLike)
Definition: range.hpp:48
UnoptimizedRange(CopyableRangeLike &&rangeLike) requires(sizeof...(ObservedValues)
typename ObservedAddReference< std::decay_t< T > >::type ObservedAddReference_t
Definition: observed_value.hpp:1545
typename ObservedAddMutableReference< std::remove_reference_t< T > >::type ObservedAddMutableReference_t
Definition: observed_value.hpp:1547
Definition: file_dialog.hpp:6
UnoptimizedRange< IteratorAccessor< ContainerT const >, std::decay_t< Detail::ObservedAddReference_t< Observed > >... > range(ContainerT const &container, Observed &&... observed)
Definition: range.hpp:97
ObservedValueCombinator(ObservedValues &&...) -> ObservedValueCombinator< std::decay_t< Detail::ObservedAddReference_t< ObservedValues >>... >
requires(IsObservedLike< ObservedValues > &&...) ObservedValueCombinator< std
Definition: observed_value_combinator.hpp:191