Adding `final` can allow gcc to devirtualize a call. Request compiler
warnings wherever `final` would improve this. As of this writing, there
are no places where `final` would be helpful and would also be wrong, so
this is enabled everywhere.
enumerated_bitset expects that typename `E` and `std::size_t` are
distinct types. On some i686 targets, `std::size_t` is an alias for
`unsigned int`, so setting `E = uint32_t` causes `std::size_t` and `E`
to be the same type.
Add a workaround by using `unsigned int` or `unsigned long`, whichever
one `std::size_t` is not. This will become unnecessary once
`playernum_t` becomes an `enum class`.
Reported-by: pkubaj <https://github.com/dxx-rebirth/dxx-rebirth/issues/662>
VR requires glDrawBuffer, which Mesa OpenGL ES does not offer. Default
VR to disabled for OpenGL ES users. Users who want to try it anyway can
still set use_stereo_render=1 in the SCons environment.
std::ranges::range<T> requires that T provide a reasonable `end()`.
cstring_tie did not provide one since it uses private inheritance of
`std::array`. However, it can provide a reasonable one, so define that
here.
The concept std::ranges::range<T> requires that std::ranges::end(T) be
well-formed. An input with a `const` qualified member fails this test,
and causes std::ranges::range<T> to reject an otherwise satisfiable
range.
`std::size_t` is `unsigned int` on i686-pc-linux-gnu, but is `unsigned
long` on x86_64-pc-linux-gnu. This mismatch allows d_array<E =
std::size_t> to be well-formed on x86_64, but trigger a duplicate
definition of operator[](E) on i686. Add a requires() check that
forbids both types for E, so that code which would break the i686 build
is also diagnosed in the x86_64 build.
Change from `uint_fast32_t` to `std::size_t` for consistency with how
arrays are typically indexed.
Change the decltype() lookup to use a non-template function for the
fallback case.
Move the remove_reference logic into the caller, to allow fewer
instantiations of `array_index_type`.
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`.