From 47b2f4d8a7e592bf9847752a0f881c33a0661fbc Mon Sep 17 00:00:00 2001 From: Scott Dixon Date: Sat, 24 Oct 2026 18:04:20 -0700 Subject: [PATCH 1/3] Fix VLA bool shadow regression and gate public header diagnostics (#263) --- cetlvast/CMakeLists.txt | 3 ++ .../cmake/compiler_flag_sets/default.cmake | 1 + cetlvast/suites/headers/CMakeLists.txt | 54 +++++++++++++++++++ .../unittest/optional/test_pf17_optional.cpp | 4 +- .../test_pf17_polymorphic_allocator.cpp | 4 +- .../test_pf17_variant_assignment_1.cpp | 4 +- .../test_pf17_variant_assignment_2.cpp | 4 +- .../unittest/test_pf17_variant_ctor_2.cpp | 4 +- .../unittest/test_pf17_variant_ctor_3.cpp | 4 +- .../unittest/test_pf17_variant_other.cpp | 6 +-- .../test_variable_length_array_assign.cpp | 13 +++++ include/cetl/variable_length_array.hpp | 8 +-- 12 files changed, 90 insertions(+), 19 deletions(-) create mode 100644 cetlvast/suites/headers/CMakeLists.txt diff --git a/cetlvast/CMakeLists.txt b/cetlvast/CMakeLists.txt index 5692e753..d63e2930 100644 --- a/cetlvast/CMakeLists.txt +++ b/cetlvast/CMakeLists.txt @@ -203,6 +203,7 @@ endif() add_subdirectory(${CMAKE_SOURCE_DIR}/suites/unittest) add_subdirectory(${CMAKE_SOURCE_DIR}/suites/docs) add_subdirectory(${CMAKE_SOURCE_DIR}/suites/compile) +add_subdirectory(${CMAKE_SOURCE_DIR}/suites/headers) if(benchmark_FOUND) add_subdirectory(${CMAKE_SOURCE_DIR}/suites/benchmark) endif() @@ -240,6 +241,7 @@ add_custom_target( build_unittests build_examples build_compile_tests + build_header_tests ) add_custom_target( @@ -250,6 +252,7 @@ add_custom_target( run_examples $<$:gcovr_html_report_for_examples> run_compile_precheck_tests + build_header_tests ) # "release" is a legacy target supported for older build systems that use this diff --git a/cetlvast/cmake/compiler_flag_sets/default.cmake b/cetlvast/cmake/compiler_flag_sets/default.cmake index 9bdde3e8..b4dc8e9d 100644 --- a/cetlvast/cmake/compiler_flag_sets/default.cmake +++ b/cetlvast/cmake/compiler_flag_sets/default.cmake @@ -19,6 +19,7 @@ list(APPEND C_FLAG_SET "-pedantic" "-Wall" "-Wextra" + "-Wshadow" "-Werror" "-Wfloat-equal" "-Wconversion" diff --git a/cetlvast/suites/headers/CMakeLists.txt b/cetlvast/suites/headers/CMakeLists.txt new file mode 100644 index 00000000..9fd5b679 --- /dev/null +++ b/cetlvast/suites/headers/CMakeLists.txt @@ -0,0 +1,54 @@ +# +# Copyright (C) OpenCyphal Development Team +# SPDX-License-Identifier: MIT +# + +cmake_minimum_required(VERSION 3.22.0) + +project(cetlvast_header_tests CXX) + +# Discover new public headers automatically. Compile each header in isolation and on either side of each +# polyfill facade: namespace aliases can expose diagnostics that isolated headers do not trigger (#263). +file(GLOB_RECURSE PUBLIC_HEADERS CONFIGURE_DEPENDS RELATIVE "${CETL_INCLUDE}" "${CETL_INCLUDE}/cetl/*.hpp") +set(HEADER_TEST_SOURCES) +foreach(HEADER IN LISTS PUBLIC_HEADERS) + string(MAKE_C_IDENTIFIER "${HEADER}" HEADER_ID) + foreach(LAYOUT standalone pf17_first pf17_last pf20_first pf20_last) + set(INCLUDES "#include <${HEADER}>\n") + if(LAYOUT MATCHES "^pf(17|20)_(first|last)$") + set(FACADE "#include \n") + if(CMAKE_MATCH_2 STREQUAL "first") + string(PREPEND INCLUDES "${FACADE}") + else() + string(APPEND INCLUDES "${FACADE}") + endif() + endif() + set(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/${HEADER_ID}_${LAYOUT}.cpp") + file(CONFIGURE OUTPUT "${SOURCE}" CONTENT "${INCLUDES}" @ONLY) + list(APPEND HEADER_TEST_SOURCES "${SOURCE}") + endforeach() +endforeach() + +foreach(ORDER forward reverse) + set(ORDERED_HEADERS ${PUBLIC_HEADERS}) + if(ORDER STREQUAL "reverse") + list(REVERSE ORDERED_HEADERS) + endif() + set(INCLUDES "") + foreach(HEADER IN LISTS ORDERED_HEADERS) + string(APPEND INCLUDES "#include <${HEADER}>\n") + endforeach() + set(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/all_headers_${ORDER}.cpp") + file(CONFIGURE OUTPUT "${SOURCE}" CONTENT "${INCLUDES}" @ONLY) + list(APPEND HEADER_TEST_SOURCES "${SOURCE}") +endforeach() + +add_library(header_tests OBJECT ${HEADER_TEST_SOURCES}) +target_link_libraries(header_tests PRIVATE cetl o1heap) +# Keep each include order in its own translation unit, including in unity builds. +set_target_properties(header_tests PROPERTIES UNITY_BUILD OFF DISABLE_PRECOMPILE_HEADERS ON) + +add_custom_target(build_header_tests DEPENDS header_tests) +# CI presets build and run unit tests directly as well as through the aggregate build target. +add_dependencies(build_unittests build_header_tests) +add_dependencies(run_unittests build_header_tests) diff --git a/cetlvast/suites/unittest/optional/test_pf17_optional.cpp b/cetlvast/suites/unittest/optional/test_pf17_optional.cpp index 33e18ca0..e8c52b87 100644 --- a/cetlvast/suites/unittest/optional/test_pf17_optional.cpp +++ b/cetlvast/suites/unittest/optional/test_pf17_optional.cpp @@ -280,8 +280,8 @@ TEST(test_optional, throwing_move_only_propagates) template struct comparable final { - explicit constexpr comparable(const T& value) - : value(value) + explicit constexpr comparable(const T& initial_value) + : value(initial_value) { } comparable(const comparable&) = delete; diff --git a/cetlvast/suites/unittest/test_pf17_polymorphic_allocator.cpp b/cetlvast/suites/unittest/test_pf17_polymorphic_allocator.cpp index 341642b3..736641e6 100644 --- a/cetlvast/suites/unittest/test_pf17_polymorphic_allocator.cpp +++ b/cetlvast/suites/unittest/test_pf17_polymorphic_allocator.cpp @@ -327,8 +327,8 @@ struct OnlyMovable OnlyMovable(const OnlyMovable&) = delete; OnlyMovable& operator=(const OnlyMovable&) = delete; - OnlyMovable(int* value) - : value(value) + OnlyMovable(int* initial_value) + : value(initial_value) { } diff --git a/cetlvast/suites/unittest/test_pf17_variant_assignment_1.cpp b/cetlvast/suites/unittest/test_pf17_variant_assignment_1.cpp index 8e8c1160..ed958f06 100644 --- a/cetlvast/suites/unittest/test_pf17_variant_assignment_1.cpp +++ b/cetlvast/suites/unittest/test_pf17_variant_assignment_1.cpp @@ -385,8 +385,8 @@ static constexpr auto test_assignment_1_constexpr() using cetl::pf17::in_place_index; struct U { - constexpr explicit U(const std::int64_t value) - : value(value) + constexpr explicit U(const std::int64_t initial_value) + : value(initial_value) { } constexpr U(const U&) noexcept = default; diff --git a/cetlvast/suites/unittest/test_pf17_variant_assignment_2.cpp b/cetlvast/suites/unittest/test_pf17_variant_assignment_2.cpp index 87fbacb4..29a587fa 100644 --- a/cetlvast/suites/unittest/test_pf17_variant_assignment_2.cpp +++ b/cetlvast/suites/unittest/test_pf17_variant_assignment_2.cpp @@ -347,8 +347,8 @@ static constexpr auto test_assignment_2_constexpr() using cetl::pf17::get; struct U { - constexpr explicit U(const std::int64_t value) - : value(value) + constexpr explicit U(const std::int64_t initial_value) + : value(initial_value) { } constexpr U(const U&) noexcept = delete; diff --git a/cetlvast/suites/unittest/test_pf17_variant_ctor_2.cpp b/cetlvast/suites/unittest/test_pf17_variant_ctor_2.cpp index b968dfb1..027088fd 100644 --- a/cetlvast/suites/unittest/test_pf17_variant_ctor_2.cpp +++ b/cetlvast/suites/unittest/test_pf17_variant_ctor_2.cpp @@ -115,8 +115,8 @@ static constexpr auto test_ctor_2_constexpr() using cetl::pf17::in_place_index; struct U { - constexpr explicit U(const std::int64_t value) - : value(value) + constexpr explicit U(const std::int64_t initial_value) + : value(initial_value) { } constexpr U(const U&) noexcept = default; diff --git a/cetlvast/suites/unittest/test_pf17_variant_ctor_3.cpp b/cetlvast/suites/unittest/test_pf17_variant_ctor_3.cpp index f71543b3..2b142ba2 100644 --- a/cetlvast/suites/unittest/test_pf17_variant_ctor_3.cpp +++ b/cetlvast/suites/unittest/test_pf17_variant_ctor_3.cpp @@ -136,8 +136,8 @@ static constexpr auto test_ctor_3_constexpr() using cetl::pf17::get; struct U { - constexpr explicit U(const std::int64_t value) - : value(value) + constexpr explicit U(const std::int64_t initial_value) + : value(initial_value) { } constexpr U(const U&) noexcept = delete; diff --git a/cetlvast/suites/unittest/test_pf17_variant_other.cpp b/cetlvast/suites/unittest/test_pf17_variant_other.cpp index 207d2ef4..c0c948ed 100644 --- a/cetlvast/suites/unittest/test_pf17_variant_other.cpp +++ b/cetlvast/suites/unittest/test_pf17_variant_other.cpp @@ -888,9 +888,9 @@ TEST(test_variant, visit) variant b(in_place_index<0>, 1234); std::int64_t div = 0; visit(make_overloaded( - [&div](anchored& a, std::int64_t& b) { - div = a.value / b; - std::swap(a.value, b); + [&div](anchored& lhs, std::int64_t& rhs) { + div = lhs.value / rhs; + std::swap(lhs.value, rhs); }, [](const auto&, const auto&) { std::terminate(); }), a, diff --git a/cetlvast/suites/unittest/test_variable_length_array_assign.cpp b/cetlvast/suites/unittest/test_variable_length_array_assign.cpp index 5e7bdf04..b33d83cb 100644 --- a/cetlvast/suites/unittest/test_variable_length_array_assign.cpp +++ b/cetlvast/suites/unittest/test_variable_length_array_assign.cpp @@ -4,6 +4,8 @@ /// Copyright (C) OpenCyphal Development Team /// SPDX-License-Identifier: MIT +// Include the facade first so namespace aliases participate in VLA diagnostics (#263). +#include "cetl/pf17/cetlpf.hpp" #include "cetl/variable_length_array.hpp" #include "cetlvast/helpers_gtest.hpp" @@ -22,6 +24,17 @@ namespace template using Array = cetl::variable_length_array>; +TEST(VLAAssignPolyfill, BoolPointerRange) +{ + const bool source[] = {true, false, true}; + Array actual{std::allocator{}}; + actual.assign(std::begin(source), std::end(source)); + ASSERT_EQ(actual.size(), 3U); + EXPECT_TRUE(actual[0]); + EXPECT_FALSE(actual[1]); + EXPECT_TRUE(actual[2]); +} + template class VLAAssign : public ::testing::Test {}; diff --git a/include/cetl/variable_length_array.hpp b/include/cetl/variable_length_array.hpp index a8e1d78a..25b54eed 100644 --- a/include/cetl/variable_length_array.hpp +++ b/include/cetl/variable_length_array.hpp @@ -3648,15 +3648,15 @@ class variable_length_array : protected detail::variable_length size_type index = 0; while (index < available) { - unsigned byte = 0U; - const unsigned bits = static_cast(std::min(8U, available - index)); + unsigned packed = 0U; + const unsigned bits = static_cast(std::min(8U, available - index)); for (unsigned bit = 0U; bit < bits; ++bit, (void) ++first) { bool value = false; base::assign_element(value, *first); - byte |= (value ? 1U : 0U) << bit; + packed |= (value ? 1U : 0U) << bit; } - data_[index / 8U] = static_cast(byte); + data_[index / 8U] = static_cast(packed); index += bits; } set_size_bits(available); From 11ce897e292fe5c77f0e2a31636e8166235a7ec2 Mon Sep 17 00:00:00 2001 From: Scott Dixon Date: Sat, 24 Oct 2026 18:18:52 -0700 Subject: [PATCH 2/3] Fix remaining test shadow warnings on GCC 7 and C++17 --- .../unittest/test_pf17_polymorphic_allocator.cpp | 12 ++++++------ cetlvast/suites/unittest/test_pf17_variant_other.cpp | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/cetlvast/suites/unittest/test_pf17_polymorphic_allocator.cpp b/cetlvast/suites/unittest/test_pf17_polymorphic_allocator.cpp index 736641e6..ea364baa 100644 --- a/cetlvast/suites/unittest/test_pf17_polymorphic_allocator.cpp +++ b/cetlvast/suites/unittest/test_pf17_polymorphic_allocator.cpp @@ -343,9 +343,9 @@ TYPED_TEST(TestPolymorphicAllocatorMoveOnlyProtocols, TestDefaultConstruction) { typename cetlvast::MRH::template MemoryResourceType* resource = cetlvast::MRH::template new_delete_resource_by_tag(); - using AllocatorType = typename TestFixture::template AllocatorType; - AllocatorType subject{resource}; - OnlyMovable* p = subject.allocate(1); + using SubjectAllocator = typename TestFixture::template AllocatorType; + SubjectAllocator subject{resource}; + OnlyMovable* p = subject.allocate(1); ASSERT_FALSE(nullptr == p); subject.deallocate(p, 1); } @@ -358,9 +358,9 @@ TYPED_TEST(TestPolymorphicAllocatorMoveOnlyProtocols, TestEmplace) int other_test_data = 0; typename cetlvast::MRH::template MemoryResourceType* resource = cetlvast::MRH::template new_delete_resource_by_tag(); - using AllocatorType = typename TestFixture::template AllocatorType; - AllocatorType subject{resource}; - OnlyMovable* p = subject.allocate(1); + using SubjectAllocator = typename TestFixture::template AllocatorType; + SubjectAllocator subject{resource}; + OnlyMovable* p = subject.allocate(1); ASSERT_FALSE(nullptr == p); subject.construct(p, &test_data); ASSERT_EQ(&test_data, p->value); diff --git a/cetlvast/suites/unittest/test_pf17_variant_other.cpp b/cetlvast/suites/unittest/test_pf17_variant_other.cpp index c0c948ed..85cc8ae9 100644 --- a/cetlvast/suites/unittest/test_pf17_variant_other.cpp +++ b/cetlvast/suites/unittest/test_pf17_variant_other.cpp @@ -934,8 +934,8 @@ TEST(test_variant, visit) #if __cplusplus >= 201703L using cetl::make_overloaded; using cetl::pf17::in_place_type; - static_assert(1110 == visit(make_overloaded([](const std::int8_t a, - const float b) { return a + static_cast(b); }, + static_assert(1110 == visit(make_overloaded([](const std::int8_t lhs, + const float rhs) { return lhs + static_cast(rhs); }, [](const auto&, const auto&) { return 0; }), variant(in_place_index<1>, static_cast(123)), variant(in_place_type, 987.0F))); From 16f632799c67b4bf48ec717c43d0f5e240363546 Mon Sep 17 00:00:00 2001 From: Scott Dixon Date: Sat, 24 Oct 2026 18:40:01 -0700 Subject: [PATCH 3/3] Avoid inherited fixture alias shadowing under GCC 13 --- ...st_variable_length_array_copy_and_move.cpp | 14 +++--- ...st_variable_length_array_move_capacity.cpp | 46 +++++++++---------- 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/cetlvast/suites/unittest/test_variable_length_array_copy_and_move.cpp b/cetlvast/suites/unittest/test_variable_length_array_copy_and_move.cpp index 5c599bf5..d7a9ee41 100644 --- a/cetlvast/suites/unittest/test_variable_length_array_copy_and_move.cpp +++ b/cetlvast/suites/unittest/test_variable_length_array_copy_and_move.cpp @@ -99,9 +99,9 @@ template class VLAMoveConstructorExceptionTests : public ::testing::Test { protected: - using T = typename Params::value_type; - using Subject = cetl::variable_length_array>; - using Allocator = typename Subject::allocator_type; + using T = typename Params::value_type; + using ArrayType = cetl::variable_length_array>; + using AllocatorType = typename ArrayType::allocator_type; }; using MoveConstructorValueTypes = ::testing::Types, @@ -112,8 +112,8 @@ TYPED_TEST_SUITE(VLAMoveConstructorExceptionTests, MoveConstructorValueTypes, ); TYPED_TEST(VLAMoveConstructorExceptionTests, UnequalAllocatorAllocationFailure) { - using Subject = typename TestFixture::Subject; - using Allocator = typename TestFixture::Allocator; + using Subject = typename TestFixture::ArrayType; + using Allocator = typename TestFixture::AllocatorType; MoveConstructorAllocatorState source_state; MoveConstructorAllocatorState destination_state; @@ -158,8 +158,8 @@ TYPED_TEST(VLAMoveConstructorExceptionTests, UnequalAllocatorAllocationFailure) TYPED_TEST(VLAMoveConstructorExceptionTests, EqualAllocatorDoesNotAllocate) { - using Subject = typename TestFixture::Subject; - using Allocator = typename TestFixture::Allocator; + using Subject = typename TestFixture::ArrayType; + using Allocator = typename TestFixture::AllocatorType; MoveConstructorAllocatorState state; { diff --git a/cetlvast/suites/unittest/test_variable_length_array_move_capacity.cpp b/cetlvast/suites/unittest/test_variable_length_array_move_capacity.cpp index e7c2015a..96744e27 100644 --- a/cetlvast/suites/unittest/test_variable_length_array_move_capacity.cpp +++ b/cetlvast/suites/unittest/test_variable_length_array_move_capacity.cpp @@ -114,8 +114,8 @@ template class VLAMoveCapacityTests : public ::testing::Test { protected: - using Subject = cetl::variable_length_array>; - using Allocator = typename Subject::allocator_type; + using ArrayType = cetl::variable_length_array>; + using AllocatorType = typename ArrayType::allocator_type; static std::size_t storage_bytes(std::size_t capacity) { @@ -126,7 +126,7 @@ class VLAMoveCapacityTests : public ::testing::Test // Retention must preserve the original allocation and allocator, permit filling it without allocation, // and allow the caller to release it explicitly. Repeated shrinking must not deallocate twice. Releasing the // allocation through any allocator other than the source's fails in TrackingAllocator::deallocate. - static void check_retained_source(Subject& source, AllocationState& state, void* allocation) + static void check_retained_source(ArrayType& source, AllocationState& state, void* allocation) { ASSERT_TRUE(source.empty()); ASSERT_EQ(source.capacity(), SourceCapacity); @@ -154,7 +154,7 @@ class VLAMoveCapacityTests : public ::testing::Test } // Write the payload that check_values expects, ending in a partial byte for packed bits. - static void fill(Subject& array) + static void fill(ArrayType& array) { for (std::size_t i = 0; i < ElementCount; ++i) { @@ -164,7 +164,7 @@ class VLAMoveCapacityTests : public ::testing::Test // Preserve payload and packed-bit size across the transfer, including the partial final byte. Elements appended // after the transfer may follow the payload, so the caller states the total size. - static void check_values(const Subject& array, const std::size_t size = ElementCount) + static void check_values(const ArrayType& array, const std::size_t size = ElementCount) { ASSERT_EQ(array.size(), size); for (std::size_t i = 0; i < ElementCount; ++i) @@ -180,8 +180,8 @@ TYPED_TEST_SUITE(VLAMoveCapacityTests, ValueTypes, ); // Relocation retains the source allocation while the destination acquires only enough storage for its elements. TYPED_TEST(VLAMoveCapacityTests, UnequalAllocatorPreservesSourceCapacity) { - using Subject = typename TestFixture::Subject; - using Allocator = typename TestFixture::Allocator; + using Subject = typename TestFixture::ArrayType; + using Allocator = typename TestFixture::AllocatorType; AllocationState source_state; AllocationState destination_state; @@ -222,8 +222,8 @@ TYPED_TEST(VLAMoveCapacityTests, UnequalAllocatorPreservesSourceCapacity) // An empty reserved source keeps its allocation; the destination needs no storage at all. TYPED_TEST(VLAMoveCapacityTests, UnequalAllocatorMovesEmptyReservedSource) { - using Subject = typename TestFixture::Subject; - using Allocator = typename TestFixture::Allocator; + using Subject = typename TestFixture::ArrayType; + using Allocator = typename TestFixture::AllocatorType; AllocationState source_state; AllocationState destination_state; @@ -248,8 +248,8 @@ TYPED_TEST(VLAMoveCapacityTests, UnequalAllocatorMovesEmptyReservedSource) // Equal allocators transfer the entire allocation; shrinking the empty source cannot release destination storage. TYPED_TEST(VLAMoveCapacityTests, EqualAllocatorTransfersUnusedCapacity) { - using Subject = typename TestFixture::Subject; - using Allocator = typename TestFixture::Allocator; + using Subject = typename TestFixture::ArrayType; + using Allocator = typename TestFixture::AllocatorType; AllocationState state; Subject source{Allocator{state}}; @@ -286,8 +286,8 @@ TYPED_TEST(VLAMoveCapacityTests, EqualAllocatorTransfersUnusedCapacity) // Destination reuse covers both assignment into existing elements and construction of a new suffix. TYPED_TEST(VLAMoveCapacityTests, UnequalAllocatorAssignmentPreservesSourceCapacity) { - using Subject = typename TestFixture::Subject; - using Allocator = typename TestFixture::Allocator; + using Subject = typename TestFixture::ArrayType; + using Allocator = typename TestFixture::AllocatorType; struct Shape { std::size_t size; @@ -327,8 +327,8 @@ TYPED_TEST(VLAMoveCapacityTests, UnequalAllocatorAssignmentPreservesSourceCapaci // Assigning an empty reserved source clears the destination's elements while both buffers stay available. TYPED_TEST(VLAMoveCapacityTests, UnequalAllocatorAssignmentFromEmptyReservedSource) { - using Subject = typename TestFixture::Subject; - using Allocator = typename TestFixture::Allocator; + using Subject = typename TestFixture::ArrayType; + using Allocator = typename TestFixture::AllocatorType; AllocationState source_state; AllocationState destination_state; Subject source{Allocator{source_state}}; @@ -353,8 +353,8 @@ TYPED_TEST(VLAMoveCapacityTests, UnequalAllocatorAssignmentFromEmptyReservedSour // shrinking the empty source cannot release destination storage. TYPED_TEST(VLAMoveCapacityTests, EqualAllocatorAssignmentTransfersUnusedCapacity) { - using Subject = typename TestFixture::Subject; - using Allocator = typename TestFixture::Allocator; + using Subject = typename TestFixture::ArrayType; + using Allocator = typename TestFixture::AllocatorType; AllocationState state; Subject source{Allocator{state}}; Subject destination{Allocator{state}}; @@ -388,8 +388,8 @@ TYPED_TEST(VLAMoveCapacityTests, EqualAllocatorAssignmentTransfersUnusedCapacity // report the failure; without them the empty destination and non-empty source report it. Either way a retry works. TYPED_TEST(VLAMoveCapacityTests, UnequalAllocatorDeclinedConstructionLeavesSourceUnchanged) { - using Subject = typename TestFixture::Subject; - using Allocator = typename TestFixture::Allocator; + using Subject = typename TestFixture::ArrayType; + using Allocator = typename TestFixture::AllocatorType; AllocationState source_state; AllocationState destination_state; Subject source{Allocator{source_state}}; @@ -422,8 +422,8 @@ TYPED_TEST(VLAMoveCapacityTests, UnequalAllocatorDeclinedConstructionLeavesSourc // Assignment releases an insufficient destination buffer before a declined replacement allocation (#225). TYPED_TEST(VLAMoveCapacityTests, UnequalAllocatorDeclinedAssignmentLeavesSourceUnchanged) { - using Subject = typename TestFixture::Subject; - using Allocator = typename TestFixture::Allocator; + using Subject = typename TestFixture::ArrayType; + using Allocator = typename TestFixture::AllocatorType; AllocationState source_state; AllocationState destination_state; Subject source{Allocator{source_state}}; @@ -458,8 +458,8 @@ TYPED_TEST(VLAMoveCapacityTests, UnequalAllocatorDeclinedAssignmentLeavesSourceU // the destination never holds more elements than its own max_size() (#224). TYPED_TEST(VLAMoveCapacityTests, UnequalAllocatorAssignmentAdoptsSourceMaxSize) { - using Subject = typename TestFixture::Subject; - using Allocator = typename TestFixture::Allocator; + using Subject = typename TestFixture::ArrayType; + using Allocator = typename TestFixture::AllocatorType; { // Replacement: the destination's bound and capacity are both smaller than the source's elements. AllocationState source_state;