]> git.ipfire.org Git - thirdparty/squid.git/commit - configure.ac
Require C++17 (#1212)
authorAlex Rousskov <rousskov@measurement-factory.com>
Tue, 13 Dec 2022 23:17:48 +0000 (23:17 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Thu, 15 Dec 2022 23:30:59 +0000 (23:30 +0000)
commit09835feb258c3058d028918e36d959dccb3f7496
tree58bb5193c767441732baa5c136f1720cb2f07a69
parent4a3b85322ce5a464175eb49ddb5be413794b25b8
Require C++17 (#1212)

Modern environments support C++17 well. We are wasting significant
amounts of time on emulating such basic C++17 features as std::optional.
We are writing worse code than we can because we lack access to such
C++14 and C++17 features like std::make_unique and std::byte.

The following language-standard-dependent TODOs were completed:

* Switched to [[fallthrough]] attributes.
* Replaced Optional with std::optional.
* Replaced EnableIfType with std::enable_if_t.
* Removed old C++11 type replacements (e.g., xuniform_int_distribution).
* Removed std::allocator declarations deprecated in C++17.
* Made ToSBuf() readable using a fold expression.
* Simplified compile-time "natural type" assertions.
* Used std::container::emplace*() return value where warranted.

Moved BUILDCXX-setting code after AX_CXX_COMPILE_STDCXX adds -std=c++17
to CXX (rather than CXXFLAGS!). Our cf_gen was built with compiler's
default C++ standard version! Ideally, BUILDCXX block should be lowered
further -- other macros might alter CXX -- but its CXXFLAGS adjustment
may affect subsequent code, warranting a careful/dedicated change.
64 files changed:
acinclude/ax_cxx_0x_types.m4 [deleted file]
acinclude/ax_cxx_compile_stdcxx.m4 [new file with mode: 0644]
acinclude/ax_cxx_compile_stdcxx_11.m4 [deleted file]
compat/types.h
configure.ac
lib/hash.cc
lib/ntlmauth/ntlmauth.cc
scripts/source-maintenance.sh
src/HttpHdrSc.cc
src/SquidMath.h
src/acl/Random.cc
src/acl/external/AD_group/ext_ad_group_acl.cc
src/acl/external/LM_group/ext_lm_group_acl.cc
src/acl/external/session/ext_session_acl.cc
src/acl/external/unix_group/check_group.cc
src/adaptation/icap/Xaction.cc
src/adaptation/icap/Xaction.h
src/auth/basic/RADIUS/basic_radius_auth.cc
src/auth/basic/SSPI/basic_sspi_auth.cc
src/auth/digest/Config.cc
src/auth/digest/UserRequest.cc
src/auth/negotiate/Config.cc
src/auth/negotiate/SSPI/negotiate_sspi_auth.cc
src/auth/negotiate/UserRequest.cc
src/auth/ntlm/Config.cc
src/auth/ntlm/SSPI/ntlm_sspi_auth.cc
src/auth/ntlm/UserRequest.cc
src/auth/ntlm/fake/ntlm_fake_auth.cc
src/auth/toUtf.cc
src/base/AsyncCallbacks.h
src/base/ClpMap.h
src/base/EnumIterator.h
src/base/IoManip.h
src/base/Makefile.am
src/base/Optional.h [deleted file]
src/base/SupportOrVeto.h
src/base/TypeTraits.h
src/base/forward.h
src/cf_gen.cc
src/client_side.cc
src/clients/FtpClient.cc
src/comm/Tcp.cc
src/debug/debug.cc
src/dns_internal.cc
src/errorpage.cc
src/event.cc
src/fs/ufs/UFSSwapDir.cc
src/http.cc
src/http/RegisteredHeadersHash.cci
src/http/StatusCode.cc
src/http/url_rewriters/fake/fake.cc
src/ipc/TypedMsgHdr.h
src/ipcache.cc
src/log/FormattedLog.cc
src/log/FormattedLog.h
src/mem/PoolingAllocator.h
src/sbuf/Stream.h
src/servers/Http1Server.cc
src/store/SwapMeta.h
src/tests/SBufFindTest.cc
src/tests/testMath.cc
src/tunnel.cc
test-suite/splay.cc
tools/cachemgr.cc