Apple clang is currently version 14, but Apple's libc++ is version 13,
and so lacks even more std::ranges support than previously reported.
Add more stub backports to work around this.
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.
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.
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::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`.
Haiku does not accept `-pthread`, and puts its network functions in a
separate library. Add a special HaikuPlatformSettings to handle these
quirks.
Reported-by: LambdaCalculus37 <https://github.com/dxx-rebirth/dxx-rebirth/issues/641>
Windows shells interpret quoting differently from Linux shells, causing
some of the generated strings to have ugly escape sequences in them.
Switch to passing the defined values as lists of character codes, so
that no quoting is needed. This makes the command line uglier, but
produces more readable strings in the generated program.
These are not referenced in SConstruct. messagebox.c uses C linkage for
symbols that would be referenced from a C++ file, so this has likely
been broken since the common code moved to C++.
These have been disabled since they were added in 2016, and the new HTTP
tracker they were meant to support was never put into service. Remove
the tests.
Fixes: 9a8bd1aecb ("Add disabled tests for curl/jsoncpp")
Compiler error messages are generally better when reporting a misuse
that fails a requires() versus reporting a misuse that fails a
std::enable_if. In some cases, this also makes the code clearer, and
avoids the need for dummy template parameters as a place to invoke
std::enable_if.
clang-13 needed an operator==(const exact_type<T>&) defined to avoid an
ambiguity. Now that C++20 mode is enabled, switch to a
compiler-generated operator== instead of manually defining the
equivalent function.
clang rejects the entire database if any entry lacks a 'file' key,
regardless of whether the entry is used.
Fixes: bc6d043f5d ("Extend SConstruct compilation_database support to cover Program()")
`check_header_includes` requires `git` to be installed and able to list
files from a working copy. When `GIT=''` is used, SConstruct is told
not to find or run `git`. This caused a traceback when
`check_header_includes` tried to use git to list headers. Reorder the
test to report a clear failure message.
Commit f1606f7747 ("Simplify test for
__builtin_bswap16") changed the SConstruct test to either define both
DXX_HAVE_BUILTIN_BSWAP and DXX_HAVE_BUILTIN_BSWAP16 or to define neither
of them. Follow up that commit by removing the definition of
DXX_HAVE_BUILTIN_BSWAP16 and redirecting uses of it to
DXX_HAVE_BUILTIN_BSWAP.
The result of git-archive expanding `$Format:%H` will always be a valid
string. Repeat the format specifier, so that the call to `.format()`
can be removed.
Select flags parsed from pkg-config stdout were logged to the screen and
to sconf.log. Add a line in sconf.log which shows the full stdout of
pkg-config.
This does not need to be a local function. It does not need to access
anything from the containing scope, so move it to be a static method on
the class.
This is not required by clang, but should be useful for anyone who wants
to produce a machine-readable list of all the compile commands run for
building the program. Previously, compilation_database would describe
how to build object files from sources, but not how to link those
objects.