/*
+ * Copyright (C) 1996-2020 The Squid Software Foundation and contributors
+ *
+ * Squid software is distributed under GPLv2+ license and includes
+ * contributions from numerous individuals and organizations.
+ * Please see the COPYING and CONTRIBUTORS files for details.
*/
#ifndef SQUID_IPC_MEM_FLEXIBLE_ARRAY_H
#define SQUID_IPC_MEM_FLEXIBLE_ARRAY_H
// sometimes required for placement-new operator to be declared
-#include <new>
+#include <new>
namespace Ipc
{
public:
explicit FlexibleArray(const int capacity) {
if (capacity > 1) // the first item is initialized automatically
- new (items+1) Item[capacity-1];
+ new (raw()+1) Item[capacity-1];
}
Item &operator [](const int idx) { return items[idx]; }
} // namespace Ipc
#endif /* SQUID_IPC_MEM_FLEXIBLE_ARRAY_H */
+