diff --git a/utest/GC.test.cpp b/utest/GC.test.cpp index c5245243..3912e8e4 100644 --- a/utest/GC.test.cpp +++ b/utest/GC.test.cpp @@ -182,11 +182,23 @@ namespace xo { Nested member1_; }; + template struct MemberType { - MemberType() : ctor_ran_{true} {} - explicit MemberType(const std::vector> & mem2) : member2_{mem2} {} + public: + using allocator_type = Allocator; + using vector_allocator_type = typename std::allocator_traits::template rebind_alloc>; + using vector_type = std::vector, vector_allocator_type>; - std::vector> member2_; + public: + MemberType() : ctor_ran_{true} {} + explicit MemberType(const Allocator & alloc) + : member2_{vector_allocator_type(alloc)}, ctor_ran_{true} {} + + explicit MemberType(const vector_type & mem2) : member2_{mem2}, ctor_ran_{true} {} + MemberType(const vector_type & mem2, const Allocator & alloc) + : member2_{mem2, vector_allocator_type(alloc)}, ctor_ran_{true} {} + + vector_type member2_; std::size_t ctor_ran_ = false; }; }