diff options
author | Johannes Stoelp <johannes.stoelp@gmail.com> | 2024-10-07 20:59:55 +0200 |
---|---|---|
committer | Johannes Stoelp <johannes.stoelp@gmail.com> | 2024-10-07 20:59:55 +0200 |
commit | d2f7bd5e0aaa51f52fb0785c84c0f28fde84f5a5 (patch) | |
tree | b853b12574975a072d724e9ac7323c04e8a5b364 /compressed_pair.cc | |
parent | a220880dc12ff40b59130e9da0f8dfb02bef96e2 (diff) | |
download | cpp-templates-main.tar.gz cpp-templates-main.zip |
Diffstat (limited to 'compressed_pair.cc')
-rw-r--r-- | compressed_pair.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compressed_pair.cc b/compressed_pair.cc index 873c4ce..f044f29 100644 --- a/compressed_pair.cc +++ b/compressed_pair.cc @@ -68,8 +68,6 @@ struct pair : entry<T, 0>, entry<U, 1> { }; } // namespace cpp11 -struct empty {}; - #if __cplusplus >= 202002L namespace cpp20 { template <typename T, typename U> @@ -90,6 +88,8 @@ struct pair { // -- TEST ME ------------------------------------------------------------------ +struct empty {}; + static_assert(sizeof(cpp11::pair<int, int>) == 8); static_assert(sizeof(cpp11::pair<int, empty>) == 4); static_assert(sizeof(cpp11::pair<empty, empty>) == 2); |