Skip to content

Commit 3b3638a

Browse files
committed
test: non_trivially_destructible with storage (test coverage for future optimizations)
1 parent 34d2994 commit 3b3638a

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

TODO

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,4 @@ TODO:
3434
* organizer: view/storage only based model, no registry
3535
* introduce a way to inject stl from outside too
3636
* redesign snapshot as a whole
37+
* stoage: trivial destructor on exit (ie shrink_to_size) and clear/pop_all

test/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ function(SETUP_TARGET TARGET_NAME)
5555
-Wno-exceptions
5656
-Wconversion
5757
>
58-
/EHsc /wd4324 /wd4996
58+
/EHsc /wd4324 /wd4996 /bigobj
5959
# disabling INCREMENTAL is required by SizeBench
6060
$<$<CONFIG:Debug>:/Od /INCREMENTAL:NO>
6161
$<$<CONFIG:Release>:/O2>

test/entt/entity/storage.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include "../../common/config.h"
1717
#include "../../common/linter.hpp"
1818
#include "../../common/new_delete.h"
19+
#include "../../common/non_trivially_destructible.h"
1920
#include "../../common/pointer_stable.h"
2021
#include "../../common/throwing_allocator.hpp"
2122
#include "../../common/throwing_type.hpp"
@@ -86,7 +87,7 @@ struct Storage: StorageBase {
8687
template<typename Type>
8788
using StorageDeathTest = Storage<Type>;
8889

89-
using StorageTypes = ::testing::Types<int, test::pointer_stable>;
90+
using StorageTypes = ::testing::Types<int, test::pointer_stable, test::non_trivially_destructible>;
9091

9192
TYPED_TEST_SUITE(Storage, StorageTypes, );
9293
TYPED_TEST_SUITE(StorageDeathTest, StorageTypes, );

0 commit comments

Comments
 (0)