diff options
Diffstat (limited to 'src/context/context.h')
-rw-r--r-- | src/context/context.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/context/context.h b/src/context/context.h index 6462cccaa..6a35945b7 100644 --- a/src/context/context.h +++ b/src/context/context.h @@ -707,7 +707,8 @@ public: void push_back(const T& data) { makeCurrent(); if (d_size == d_sizeAlloc) grow(); - d_list[d_size++] = data; + ::new((void*)(d_list + d_size)) T(data); + ++ d_size; } /** |