OS X still uses clang-14, which lacks sufficient std::ranges support for
recent Rebirth changes.
- Rewrite uses of std::ranges::SYMBOL to ranges::SYMBOL
- Add a stub header that, on gcc, provides for each SYMBOL a statement
`using std::ranges::SYMBOL;`, to delegate back to the standard library
implementation.
- On clang, define a minimal implementation of the required symbols,
without constraint enforcement. Compile-testing with gcc will catch
constraint violations.
Once OS X clang ships a standard library with the required features,
this stub header will be removed and the uses changed back to their full
names.
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`.
Most callers do not need it, and it is only vaguely related to the
purpose of measuring a particular string. For those callers that need
it, lift it out.
Every user now uses inheritance and a virtual function override. Make
callback_handler pure virtual, delete its body, and then delete the
member variables that existed only for use in that body. Remove the
constructor parameters that initialized those variables, and update all
derived classes accordingly.
The requirement to call send_creation_events from outside the
constructor makes the presence of a helper function convenient. Rename
ui_create_dialog to window_create, and move it to window.h.
Due to ordering constraints, this is not merged into MENU, but is
instead kept as a distinct sub-type that is pointed at by MENU. MENU
sets the window's position based on parsing of the menu definition file,
but the parser expects to store window position data into MENU before
creating the window. If menubar_window were merged into MENU, the
parser would need a temporary, and all callers that create the window
would need to consult that temporary.
All callers request either the menubar or something else, but never
conditionally request one or the other. Split the special handling that
picks a different handler based on which element the caller requested.