We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
文中说aligned_alloc 并未被MSVC支持,但改用其 _aligned_malloc使用MSVC编译仍然失败;
aligned_alloc
_aligned_malloc
在C++ 17中,但是使用MIngW仍然没法编译成功aligned_alloc ,编译成功了_aligned_malloc。
namespace detail { void* allocate_aligned_memory(size_t align, size_t size) { // return std::aligned_alloc(align, size); return _aligned_malloc(size, align); } void deallocate_aligned_memory(void* ptr) noexcept { // std::free(ptr); _aligned_free(ptr); } }
请问小彭老师,在MSVC编译器下有办法解决这个问题嘛。
The text was updated successfully, but these errors were encountered:
#ifdef _MSC_VER return _aligned_malloc #else return std::aligned_alloc #endif
Sorry, something went wrong.
No branches or pull requests
文中说
aligned_alloc
并未被MSVC支持,但改用其_aligned_malloc
使用MSVC编译仍然失败;在C++ 17中,但是使用MIngW仍然没法编译成功
aligned_alloc
,编译成功了_aligned_malloc
。请问小彭老师,在MSVC编译器下有办法解决这个问题嘛。
The text was updated successfully, but these errors were encountered: