News for hackers. Stuff that matters.
Re:Safe C++ proposal is not being continued by seanbax on Sunday September 14, 2025 @11:47AM (#45240708)

  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.

There are no comments on this comment yet.