From 3dafa7573c8f9df7ae22849c84f034a334c60e14 Mon Sep 17 00:00:00 2001 From: blueloveTH Date: Sat, 8 Jun 2024 14:21:59 +0800 Subject: [PATCH] make small_vector works with pod --- include/pocketpy/common/vector.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/pocketpy/common/vector.hpp b/include/pocketpy/common/vector.hpp index f1ed4d5c..d9316780 100644 --- a/include/pocketpy/common/vector.hpp +++ b/include/pocketpy/common/vector.hpp @@ -284,6 +284,8 @@ struct vector { template struct small_vector { + static_assert(is_pod_v); + alignas(T) char _buffer[sizeof(T) * N]; T* _begin; T* _end;