We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 51cc4b7 + 5ba77fd commit b4e146bCopy full SHA for b4e146b
1 file changed
tests/tests.cpp
@@ -3,6 +3,7 @@
3
4
#include <memory>
5
#include <array>
6
+#include <vector>
7
#if THREAD_SUPPORT
8
#include <thread>
9
#endif
@@ -62,8 +63,8 @@ class Derived : Base {
62
63
};
64
65
int allocate(size_t array_size, size_t allocation_size) {
- void *p[array_size];
66
- memset(p, 0x0, array_size);
+ std::vector<void *> p(array_size);
67
+ memset(p.data(), 0x0, p.size());
68
69
for(size_t i = 0; i < array_size; i++) {
70
if(allocation_size == 0) {
0 commit comments