diff --git a/src/async_writer.cpp b/src/async_writer.cpp index bb27faa..3615e38 100644 --- a/src/async_writer.cpp +++ b/src/async_writer.cpp @@ -65,6 +65,20 @@ void AsyncWriter::queueBatchWrite(BatchedWriteTasks&& tasks, OptionalWriteDeadli } } +#if !defined(NDEBUG) && defined(_MSC_VER) && UINTPTR_MAX == 0xFFFFFFFF + +struct __declspec(align(16)) const_buffer_small_vector_type : boost::container::small_vector +{ +}; + +using const_buffer_small_vector = const_buffer_small_vector_type; + +#else + +using const_buffer_small_vector = boost::container::small_vector; + +#endif + void AsyncWriter::doWrite(const BatchedWriteTasksWithDeadline& tasksWithDeadline) { if (timeoutReached) @@ -72,7 +86,7 @@ void AsyncWriter::doWrite(const BatchedWriteTasksWithDeadline& tasksWithDeadline const auto& tasks = tasksWithDeadline.first; - boost::container::small_vector buffers; + const_buffer_small_vector buffers; for (const auto& task : tasks) {