diff options
| author | Stanislaw Halik <sthalik@misaki.pl> | 2025-08-13 19:56:10 +0200 |
|---|---|---|
| committer | Stanislaw Halik <sthalik@misaki.pl> | 2025-08-13 21:11:06 +0200 |
| commit | 0602c4ce87299e495966b0126a7c6a7adf9721e3 (patch) | |
| tree | c6d6f2d1c5edeb0c1a4a038a12bb5a15291e7510 /test | |
| parent | 7e85868471c1970a5d2aa7540c75490d8f8215d3 (diff) | |
compat: fix clang compile-time error
Add test.
Diffstat (limited to 'test')
| -rw-r--r-- | test/util.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/util.cpp b/test/util.cpp index 48332621..e250b072 100644 --- a/test/util.cpp +++ b/test/util.cpp @@ -11,6 +11,7 @@ struct Foo static constexpr const void* Array_2[22] = {}; std::array<int, 33> array_3; + int array_4[55] = {}; }; constexpr bool test_array_size() @@ -27,6 +28,10 @@ constexpr bool test_array_size() fm_assert(static_array_size<const int(&)[44]> == 44); + fm_assert(static_array_size<decltype(Foo::array_4)> == 55); + fm_assert(array_size(&Foo::array_4) == 55); + fm_assert(array_size(Foo{}.array_4) == 55); + return true; } |
