Lifetime parameters are necessary for borrow checking. And you need a special operator for initiating a borrow. You need immutability by default, because mutability everywhere violates exclusivity.
template<typename _RandomAccessIterator>
_GLIBCXX20_CONSTEXPR
inline void
sort(_RandomAccessIterator __first, _RandomAccessIterator __last)
{
// concept requirements
__glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
_RandomAccessIterator>)
__glibcxx_function_requires(_LessThanComparableConcept<
typename iterator_traits<_RandomAccessIterator>::value_type>)
__glibcxx_requires_valid_range(__first, __last);
__glibcxx_requires_irreflexive(__first, __last);
std::__sort(__first, __last, __gnu_cxx::__ops::__iter_less_iter());
}
That's the definition of std::sort. What aliasing information can be gleaned from local analysis of the function? Absolutely nothing. [[.imgui::range_float { .1, 5 }]] float Zoom = 1.5;
[[.imgui::range_float { 0, 1 }]] float Speed = .15;
[[.imgui::range_float { .1, 1 }]] float XScale = .3;
[[.imgui::range_float { 0, .5 }]] float YScale = .2;
Then loop over the members with a meta for, and emit widget code that's guided by the attribute kind and data. These attributes each define a scrollbar.