From 259edec70e41d29ef0ea9473e4c87391d721fdfa Mon Sep 17 00:00:00 2001 From: Yat Ho Date: Thu, 27 Jun 2024 12:01:46 +0800 Subject: [PATCH] fix: vector constructors should not require `DefaultInsertable` `value_type` --- include/small/vector.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/small/vector.hpp b/include/small/vector.hpp index c2c0cb3..3c11c46 100644 --- a/include/small/vector.hpp +++ b/include/small/vector.hpp @@ -436,7 +436,9 @@ namespace small { /// \brief Construct small vector with a given allocator constexpr explicit vector(const allocator_type &alloc) - : vector(0, alloc) {} + : enable_allocator_type() { + enable_allocator_type::set_allocator(alloc); + } /// \brief Construct small array with size n /// Any of the n values should be constructed with new (p) value_type();