all builds now targeting c++20 (up from 17)

This commit is contained in:
Eric 2023-10-04 19:12:31 -07:00
parent 4789fc90ab
commit f1eb7ca680
No known key found for this signature in database
GPG Key ID: 89C93F0F8D6D5A98
8 changed files with 102 additions and 92 deletions

88
.efrocachemap generated
View File

@ -4056,50 +4056,50 @@
"build/assets/windows/Win32/ucrtbased.dll": "2def5335207d41b21b9823f6805997f1",
"build/assets/windows/Win32/vc_redist.x86.exe": "b08a55e2e77623fe657bea24f223a3ae",
"build/assets/windows/Win32/vcruntime140d.dll": "865b2af4d1e26a1a8073c89acb06e599",
"build/prefab/full/linux_arm64_gui/debug/ballisticakit": "3c2b2b37faa0c827e7a515dba7a8fa25",
"build/prefab/full/linux_arm64_gui/release/ballisticakit": "ef802531bbf82293b0ed52083d945cdc",
"build/prefab/full/linux_arm64_server/debug/dist/ballisticakit_headless": "508cc12c611316ed5276ee7d926e7b70",
"build/prefab/full/linux_arm64_server/release/dist/ballisticakit_headless": "801c672cc7836c94ed090f3f11ad90a3",
"build/prefab/full/linux_x86_64_gui/debug/ballisticakit": "438173f578d3e0b407276434e1ba37a6",
"build/prefab/full/linux_x86_64_gui/release/ballisticakit": "37e256cb735133aae96ba51cb06d01a6",
"build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "23bfa2b732e6a703875e14572c3fd1eb",
"build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "68f0f68d32d272a90080fd7746f84b47",
"build/prefab/full/mac_arm64_gui/debug/ballisticakit": "a164e99217a28cd26e322d6413cf64cf",
"build/prefab/full/mac_arm64_gui/release/ballisticakit": "c83d961a17c8c28da7c7eca5192a6314",
"build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "9eefdf54ed08d80ef2226f14129e000a",
"build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "a4db7791ab708bc197cf5bf7ecc22224",
"build/prefab/full/mac_x86_64_gui/debug/ballisticakit": "728633cfb493d99846955c08b85bec16",
"build/prefab/full/mac_x86_64_gui/release/ballisticakit": "efca925b71252880a692741d38d26519",
"build/prefab/full/mac_x86_64_server/debug/dist/ballisticakit_headless": "a4bf11f9b1d0cf394fc7606928c02cf1",
"build/prefab/full/mac_x86_64_server/release/dist/ballisticakit_headless": "b40f16dbc3b6c98ca61ef22391ab9a67",
"build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "d2ac3dea823f0ed27ab3bd45b2af6eb1",
"build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "8a34d3924ae61f01003ebf8ea7166f91",
"build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "7ee211897490829f29ba1defd952400f",
"build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "144670c1e891b8378a85e8d408c0d7ce",
"build/prefab/lib/linux_arm64_gui/debug/libballisticaplus.a": "5156f353592c4211f25ee238afe038fc",
"build/prefab/lib/linux_arm64_gui/release/libballisticaplus.a": "dd16f8d0f18ef126d051c5cd725b1568",
"build/prefab/lib/linux_arm64_server/debug/libballisticaplus.a": "5156f353592c4211f25ee238afe038fc",
"build/prefab/lib/linux_arm64_server/release/libballisticaplus.a": "dd16f8d0f18ef126d051c5cd725b1568",
"build/prefab/lib/linux_x86_64_gui/debug/libballisticaplus.a": "d81a643b59391309b04187879cd045aa",
"build/prefab/lib/linux_x86_64_gui/release/libballisticaplus.a": "050b8028c1b14c314dc44ad33bf66cb7",
"build/prefab/lib/linux_x86_64_server/debug/libballisticaplus.a": "d81a643b59391309b04187879cd045aa",
"build/prefab/lib/linux_x86_64_server/release/libballisticaplus.a": "050b8028c1b14c314dc44ad33bf66cb7",
"build/prefab/lib/mac_arm64_gui/debug/libballisticaplus.a": "19dd80f1ff879e120b89fb94767418a4",
"build/prefab/lib/mac_arm64_gui/release/libballisticaplus.a": "81dd9ab9d64e8f3a038b5942a90c7ec5",
"build/prefab/lib/mac_arm64_server/debug/libballisticaplus.a": "19dd80f1ff879e120b89fb94767418a4",
"build/prefab/lib/mac_arm64_server/release/libballisticaplus.a": "81dd9ab9d64e8f3a038b5942a90c7ec5",
"build/prefab/lib/mac_x86_64_gui/debug/libballisticaplus.a": "fa8a5b2de21d629d7542b0c7335ffdf0",
"build/prefab/lib/mac_x86_64_gui/release/libballisticaplus.a": "b4f192949f671e0d20536bfbb04591e3",
"build/prefab/lib/mac_x86_64_server/debug/libballisticaplus.a": "0f6bd992d92d00526ce8746aee66dc9e",
"build/prefab/lib/mac_x86_64_server/release/libballisticaplus.a": "b4f192949f671e0d20536bfbb04591e3",
"build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.lib": "6bb9e5a8ef46a5ea9040ebc65af567b2",
"build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.pdb": "ebc29b9a80eb67258093f7ca35a467ff",
"build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.lib": "984f0cc74452ae6d597f316615f92165",
"build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.pdb": "9884ec826b4662d367291945afc0319b",
"build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.lib": "211deddf90855ac10fb191370b1a8b9f",
"build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.pdb": "93d3a7cd4f9ab503d595650ce6c4733d",
"build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.lib": "227ad657446b051c5f2cc901d459612e",
"build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.pdb": "5742a499a4526b460ffcbda7ad163027",
"build/prefab/full/linux_arm64_gui/debug/ballisticakit": "c1c0394f8ef67f66f3e687302be1bae5",
"build/prefab/full/linux_arm64_gui/release/ballisticakit": "bb034b440d7119e6fdfbbf79e7473f22",
"build/prefab/full/linux_arm64_server/debug/dist/ballisticakit_headless": "23ead987200b5474e08c0ec0584ffce1",
"build/prefab/full/linux_arm64_server/release/dist/ballisticakit_headless": "a5bd9ad61f73c8e9fb595921278deb7b",
"build/prefab/full/linux_x86_64_gui/debug/ballisticakit": "e359b657fc29d2e6cbf8d535145630ac",
"build/prefab/full/linux_x86_64_gui/release/ballisticakit": "c2f3a37e6a147817265eca40d2cec4ec",
"build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "322d96f59ae50524b28825123036677d",
"build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "ef808bb9694e6bd7f83a016734c0d80a",
"build/prefab/full/mac_arm64_gui/debug/ballisticakit": "ee0beb547c973797c413a46bef1e1c92",
"build/prefab/full/mac_arm64_gui/release/ballisticakit": "1048789848f35cff82c7de97422caf76",
"build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "741c6a2e23cc1c9fb4ae4d71e3ce353d",
"build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "dd2b5da1a59a0ff8bd672feb6fd69da4",
"build/prefab/full/mac_x86_64_gui/debug/ballisticakit": "c8fc022822d28cfc489928d9a29e87c4",
"build/prefab/full/mac_x86_64_gui/release/ballisticakit": "e1e9d1d6ccbc21dd2a8ea98bc7a0dcf3",
"build/prefab/full/mac_x86_64_server/debug/dist/ballisticakit_headless": "64747b6f0d8416a8a6a730a1d66ea9fb",
"build/prefab/full/mac_x86_64_server/release/dist/ballisticakit_headless": "2adfbda7c4c22d03736db3dca776b2e9",
"build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "e96102ef9e23b611fc359f990429317e",
"build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "1e6bb4e9fcdb71ead226351eacaf461b",
"build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "c0cf1456214fbd5aeabff60695ce5f82",
"build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "d28ed224f9b9e0cad81b3a1b8a722c5c",
"build/prefab/lib/linux_arm64_gui/debug/libballisticaplus.a": "757a2a4e9294211fa0018bdc67e0b1c7",
"build/prefab/lib/linux_arm64_gui/release/libballisticaplus.a": "48dd3167591df4494852c6c3e9047f1b",
"build/prefab/lib/linux_arm64_server/debug/libballisticaplus.a": "757a2a4e9294211fa0018bdc67e0b1c7",
"build/prefab/lib/linux_arm64_server/release/libballisticaplus.a": "48dd3167591df4494852c6c3e9047f1b",
"build/prefab/lib/linux_x86_64_gui/debug/libballisticaplus.a": "b8f3d468d46917abf4019df92594742c",
"build/prefab/lib/linux_x86_64_gui/release/libballisticaplus.a": "9a9e18d3856e343c3ca6ac136a64235a",
"build/prefab/lib/linux_x86_64_server/debug/libballisticaplus.a": "b8f3d468d46917abf4019df92594742c",
"build/prefab/lib/linux_x86_64_server/release/libballisticaplus.a": "9a9e18d3856e343c3ca6ac136a64235a",
"build/prefab/lib/mac_arm64_gui/debug/libballisticaplus.a": "d667b00185c20f91f8a4cfca56291431",
"build/prefab/lib/mac_arm64_gui/release/libballisticaplus.a": "f2f9159cd08054e71ed87db479b18d21",
"build/prefab/lib/mac_arm64_server/debug/libballisticaplus.a": "d667b00185c20f91f8a4cfca56291431",
"build/prefab/lib/mac_arm64_server/release/libballisticaplus.a": "f2f9159cd08054e71ed87db479b18d21",
"build/prefab/lib/mac_x86_64_gui/debug/libballisticaplus.a": "c5be9635152219c67b8e15969802b191",
"build/prefab/lib/mac_x86_64_gui/release/libballisticaplus.a": "0c0e93911fda8343f06b76a84b2331a3",
"build/prefab/lib/mac_x86_64_server/debug/libballisticaplus.a": "8b1daae0ffa7a0de9624c645bd4ad71c",
"build/prefab/lib/mac_x86_64_server/release/libballisticaplus.a": "0c0e93911fda8343f06b76a84b2331a3",
"build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.lib": "7a14948fa1f96abeeac83e7d7f21182c",
"build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.pdb": "578472bcfa184250aeb490d77bd9d63c",
"build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.lib": "721144d309b981fc9944d127c33bd304",
"build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.pdb": "da41b51b970e32b772b3f930c84765d3",
"build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.lib": "7fc9e2da84f6d1787aa9d380d556920a",
"build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.pdb": "cc3ee167b8f20861f8b804dd01ba206e",
"build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.lib": "ac826c9913b4f5ac23982ede5d930b97",
"build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.pdb": "1457099fc2eed44633b60d0ba6dad9a7",
"src/assets/ba_data/python/babase/_mgen/__init__.py": "f885fed7f2ed98ff2ba271f9dbe3391c",
"src/assets/ba_data/python/babase/_mgen/enums.py": "f8cd3af311ac63147882590123b78318",
"src/ballistica/base/mgen/pyembed/binding_base.inc": "9f71f171464dc004dbaab87e9bb4b03b",

View File

@ -1,4 +1,4 @@
### 1.7.28 (build 21411, api 8, 2023-10-04)
### 1.7.28 (build 21417, api 8, 2023-10-04)
- Massively cleaned up code related to rendering and window systems (OpenGL,
SDL, etc). This code had been growing into a nasty tangle for 15 years
@ -98,6 +98,9 @@
- Removed the bits from `babase.app` that were deprecated in 1.7.27. I know that
was only one version ago, but this version has been cooking for a while now.
- Visual Studio projects have been updated to target Visual Studio 2022.
- Now that all our compilers support it, updating from the C++17 standard to
C++20. This will allow a few useful things such as being able to pack 8 bools
into 1 byte.
### 1.7.27 (build 21282, api 8, 2023-08-30)

View File

@ -5,8 +5,8 @@ include(CheckIncludeFile)
option(HEADLESS "build headless server" OFF)
option(TEST_BUILD "include testing features" OFF)
# Requiring minimum of C++17 currently.
set(CMAKE_CXX_STANDARD 17)
# Requiring minimum of C++20 currently.
set(CMAKE_CXX_STANDARD 20)
if (APPLE)
# Seems as of Mojave we need to explicitly pull in homebrew paths.

View File

@ -99,7 +99,7 @@
<ExceptionHandling>SyncCThrow</ExceptionHandling>
<SDLCheck>true</SDLCheck>
<AdditionalIncludeDirectories>../../src;../../src/external/windows/include/SDL2;../../src/external/windows/include/AL;../../src/external/windows/include/python;../../src/external/windows/include;../../src/external/open_dynamics_engine-ef;../../src/external/qrencode-3.4.4</AdditionalIncludeDirectories>
<LanguageStandard>stdcpp17</LanguageStandard>
<LanguageStandard>stdcpp20</LanguageStandard>
<FloatingPointModel>Fast</FloatingPointModel>
</ClCompile>
<Link>
@ -123,7 +123,7 @@
<ExceptionHandling>SyncCThrow</ExceptionHandling>
<SDLCheck>true</SDLCheck>
<AdditionalIncludeDirectories>../../src;../../src/external/windows/include/SDL2;../../src/external/windows/include/AL;../../src/external/windows/include/python;../../src/external/windows/include;../../src/external/open_dynamics_engine-ef</AdditionalIncludeDirectories>
<LanguageStandard>stdcpp17</LanguageStandard>
<LanguageStandard>stdcpp20</LanguageStandard>
<FloatingPointModel>Fast</FloatingPointModel>
</ClCompile>
<Link>

View File

@ -101,7 +101,7 @@
<MinimalRebuild>false</MinimalRebuild>
<ExceptionHandling>SyncCThrow</ExceptionHandling>
<AdditionalIncludeDirectories>../../src;../../src/external/windows/include/SDL2;../../src/external/windows/include/AL;../../src/external/windows/include/python;../../src/external/windows/include;../../src/external/open_dynamics_engine-ef</AdditionalIncludeDirectories>
<LanguageStandard>stdcpp17</LanguageStandard>
<LanguageStandard>stdcpp20</LanguageStandard>
<FloatingPointModel>Fast</FloatingPointModel>
</ClCompile>
<Link>
@ -123,7 +123,7 @@
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<MinimalRebuild>false</MinimalRebuild>
<AdditionalIncludeDirectories>../../src;../../src/external/windows/include/SDL2;../../src/external/windows/include/AL;../../src/external/windows/include/python;../../src/external/windows/include;../../src/external/open_dynamics_engine-ef</AdditionalIncludeDirectories>
<LanguageStandard>stdcpp17</LanguageStandard>
<LanguageStandard>stdcpp20</LanguageStandard>
<FloatingPointModel>Fast</FloatingPointModel>
</ClCompile>
<Link>

View File

@ -52,7 +52,7 @@ if TYPE_CHECKING:
# Build number and version of the ballistica binary we expect to be
# using.
TARGET_BALLISTICA_BUILD = 21411
TARGET_BALLISTICA_BUILD = 21417
TARGET_BALLISTICA_VERSION = '1.7.28'

View File

@ -39,7 +39,7 @@ auto main(int argc, char** argv) -> int {
namespace ballistica {
// These are set automatically via script; don't modify them here.
const int kEngineBuildNumber = 21411;
const int kEngineBuildNumber = 21417;
const char* kEngineVersion = "1.7.28";
const int kEngineApiVersion = 8;

View File

@ -229,39 +229,26 @@ class Object {
return (Get() != ptr);
}
// Assign/compare with same type ref (apparently the template below doesn't
// cover this case?).
auto operator=(const WeakRef<T>& ref) -> WeakRef<T>& {
*this = ref.Get();
return *this;
}
// Assign/compare with same type ref (apparently the template below
// doesn't cover this case?).
//
// Update: Actually now getting errors that
// having both is ambiguous, so maybe can kill these now?..
auto operator==(const WeakRef<T>& ref) -> bool {
return (Get() == ref.Get());
}
// auto operator=(const WeakRef<T>& ref) -> WeakRef<T>& {
// *this = ref.Get();
// return *this;
// }
auto operator!=(const WeakRef<T>& ref) -> bool {
return (Get() != ref.Get());
}
// auto operator==(const WeakRef<T>& ref) -> bool {
// return (Get() == ref.Get());
// }
// Assign/compare with any compatible strong-ref.
template <typename U>
auto operator=(const Ref<U>& ref) -> WeakRef<T>& {
*this = ref.Get();
return *this;
}
// auto operator!=(const WeakRef<T>& ref) -> bool {
// return (Get() != ref.Get());
// }
template <typename U>
auto operator==(const Ref<U>& ref) -> bool {
return (Get() == ref.Get());
}
template <typename U>
auto operator!=(const Ref<U>& ref) -> bool {
return (Get() != ref.Get());
}
// Assign/compare with any compatible weak-ref.
// Assign/compare with a compatible weak-ref.
template <typename U>
auto operator=(const WeakRef<U>& ref) -> WeakRef<T>& {
*this = ref.Get();
@ -278,6 +265,23 @@ class Object {
return (Get() != ref.Get());
}
// Assign/compare with a compatible strong-ref.
template <typename U>
auto operator=(const Ref<U>& ref) -> WeakRef<T>& {
*this = ref.Get();
return *this;
}
template <typename U>
auto operator==(const Ref<U>& ref) -> bool {
return (Get() == ref.Get());
}
template <typename U>
auto operator!=(const Ref<U>& ref) -> bool {
return (Get() != ref.Get());
}
// Various constructors:
// Empty.
@ -406,7 +410,7 @@ class Object {
return *this;
}
// Assign/compare with any compatible strong-ref.
// Assign/compare with a compatible strong-ref.
template <typename U>
auto operator=(const Ref<U>& ref) -> Ref<T>& {
*this = ref.Get();
@ -423,22 +427,25 @@ class Object {
return (Get() != ref.Get());
}
// Assign/compare from any compatible weak-ref.
// Assign from a compatible weak-ref. Comparing to compatible weak-refs
// is covered by the operators on the weak-ref side.
template <typename U>
auto operator=(const WeakRef<U>& ref) -> Ref<T>& {
*this = ref.Get();
return *this;
}
template <typename U>
auto operator==(const WeakRef<U>& ref) -> bool {
return (Get() == ref.Get());
}
// These are already covered by the equivalent operators
// on the WeakRef side.
// template <typename U>
// auto operator==(const WeakRef<U>& ref) -> bool {
// return (Get() == ref.Get());
// }
template <typename U>
auto operator!=(const WeakRef<U>& ref) -> bool {
return (Get() != ref.Get());
}
// template <typename U>
// auto operator!=(const WeakRef<U>& ref) -> bool {
// return (Get() != ref.Get());
// }
// Various constructors: