We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 80f2436 commit 4f6ff6dCopy full SHA for 4f6ff6d
include/databento/detail/buffer.hpp
@@ -58,7 +58,10 @@ class Buffer : public IReadable, public IWritable {
58
using UniqueBufPtr = std::unique_ptr<std::byte[], void (*)(std::byte*)>;
59
60
std::byte* AlignedNew(std::size_t capacity) {
61
- return new (kAlignment) std::byte[capacity];
+ // Can't use `new` expression due to MSVC bug
62
+ // See
63
+ // https://developercommunity.visualstudio.com/t/using-c17-new-stdalign-val-tn-syntax-results-in-er/528320
64
+ return static_cast<std::byte*>(operator new[](capacity, kAlignment));
65
}
66
static void AlignedDelete(std::byte* p) { operator delete[](p, kAlignment); }
67
0 commit comments