When compiling with Clang on Xcode, I get the following error
../src/StackAllocator.cpp:39:39: error: non-constant-expression cannot be narrowed from type 'std::size_t' (aka 'unsigned long') to 'char' in initializer list [-Wc++11-narrowing]
AllocationHeader allocationHeader{padding};
^~~~~~~
../src/StackAllocator.cpp:39:39: note: insert an explicit cast to silence this issue
AllocationHeader allocationHeader{padding};
^~~~~~~
static_cast<char>( )
Compiler Details
Apple clang version 12.0.0 (clang-1200.0.32.28)
Target: x86_64-apple-darwin19.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
In case padding can go beyond 255, it makes sense to make AllocationHeader::padding a size_t instead of a char as suggested by @talhasaruhan in #8.
Compilation Error
When compiling with Clang on Xcode, I get the following error
Compiler Details
In case padding can go beyond 255, it makes sense to make
AllocationHeader::padding
asize_t
instead of achar
as suggested by @talhasaruhan in #8.