Commit graph

8 commits

Author SHA1 Message Date
Kp b4866b8e09 Let self_return_iterator use an implicit operator!= 2022-12-18 18:32:14 +00:00
Kp 3ef8cb1e14 Let self_return_iterator::operator== use an implicit T::operator== 2022-12-10 18:09:54 +00:00
Kp e385ff1c3b Use std::ranges::find_if instead of std::find_if
std::ranges::find_if permits use of a sentinel instead of a full
iterator, and supports std::ranges::find as an alternative to certain
simple uses of std::find_if.

Where possible, use the form that takes a range, rather than the form
that takes two iterators.

Add a declared, but not defined, default constructor for
self_return_iterator to satisfy the standard library's concept
`semiregular`, which insists that sentinels be default-constructible,
even for those functions that never need to do so.

Add a defined, but unused, operator++(postfix) for zip_iterator to
satisfy a standard library concept for `forward_iterator`.
2022-10-09 23:15:20 +00:00
Kp 6bd6a47612 Rework compress_segments to use segment iterators
This removes direct math on segnum_t, which will simplify later use of
`enum class segnum_t`.
2022-06-05 17:44:52 +00:00
Kp 755186ada2 Remove use of deprecated std::iterator 2020-05-02 21:18:43 +00:00
Kp 12b57e84e6 Switch most in-tree http:// links to https://
For each link given as http://, verify that the site is accessible over
https:// and, if so, switch to it.  These domains were converted:

* llvm.org
* clang.llvm.org
* en.cppreference.com
* www.dxx-rebirth.com
* www.libsdl.org
* www.scons.org
2018-09-02 00:57:29 +00:00
Kp bde498894a Disallow operator=(T &&) && in valptridx
GCC std::remove_if overwrites removed elements using:

	*dstiter = move(*srciter);

This is fine for normal containers, but produces incorrect results when
*dstiter returns a proxy object instead of a reference.  In that case,
the proxy object is move-assigned from the source, then goes out of
scope.  If the move assignment did not write to underlying storage, as
valptridx proxy objects do not, then incorrect results occur.  This
broke ActiveDoor handling (fixed in 4a01fab66d98[1]) and has been a trap
waiting to recur.  Apply reference-qualifiers to valptridx objects so
that move-assignment requires an lvalue for the left-hand side.  This
permits normal use of move-assignment, but forces a compile error if
std::remove_if or similar are used on valptridx proxy objects.

[1]: 4a01fab66d
2018-06-08 04:04:05 +00:00
Kp 1c1d92b399 Move valptridx factory iterator out to be generally available 2018-06-06 04:53:45 +00:00