81 template<
typename COL>
87 ,lumiera::error::LUMIERA_ERROR_BOTTOM_VALUE);
100 template <
typename COLL,
typename = enable_if< treat_as_STL_Container<COLL>>>
106 __ensure_nonempty(coll);
107 return *(unwrap(coll).begin());
115 template <
typename COLL,
typename = enable_if< can_direct_access_Last<COLL>>>
121 __ensure_nonempty(coll);
122 return *(unwrap(coll).rbegin());
130 template <
typename IT,
typename = enable_if<treat_as_LumieraIterator<IT>>>
134 __ensure_nonempty(ii);
139#ifdef LIB_ITERTOOLS_H
145 template <
typename IT,
typename = enable_if<treat_as_LumieraIterator<IT>>>
149 __ensure_nonempty(ii);
162 using Val = std::remove_reference_t<IT>::value_type;
163 Val res = std::numeric_limits<Val>::min();
164 for (
auto const& elm : std::forward<IT> (elms))
174 using Val = std::remove_reference_t<CON>::value_type;
175 Val res = std::numeric_limits<Val>::min();
176 for (
auto const& elm : elms)
187 using Val = std::remove_reference_t<IT>::value_type;
188 Val res = std::numeric_limits<Val>::max();
189 for (
auto const& elm : std::forward<IT> (elms))
199 using Val = std::remove_reference_t<CON>::value_type;
200 Val res = std::numeric_limits<Val>::max();
201 for (
auto const& elm : elms)
IT::value_type pull_last(IT iter)
LumieraError< LERR_(LOGIC)> Logic
void __ensure_nonempty(COL const &coll)
auto first(COLL const &coll)
access the first element of a STL-like container.
auto last(COLL const &coll)
access the last element of a STL-like container.
bool isnil(lib::time::Duration const &dur)
lib::meta::Unwrap< T >::Type TaT
lib::meta::Unwrap< T >::Type TaT
Helpers for type detection, type rewriting and metaprogramming.
Tiny helper functions and shortcuts to be used everywhere Consider this header to be effectively incl...