Skip to content
New issue

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

Fix compilation (veg/memory) for gcc 7 and clang 7 #255

Merged
merged 1 commit into from
Aug 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions include/proxsuite/linalg/veg/memory/alloc.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,13 +165,13 @@ aligned_alloc(usize align, usize size) noexcept -> void*
#if defined(_WIN32)
return _aligned_malloc((size + mask) & ~mask, align);
#elif defined(__APPLE__)
#ifdef PROXSUITE_WITH_CPP_17
#if defined(PROXSUITE_WITH_CPP_17) && defined(_LIBCPP_HAS_ALIGNED_ALLOC)
return alignment::aligned_alloc(align, (size + mask) & ~mask);
#else
return alignment::detail::aligned_alloc(align, (size + mask) & ~mask);
#endif
#else
#ifdef PROXSUITE_WITH_CPP_17
#if defined(PROXSUITE_WITH_CPP_17) && defined(_LIBCPP_HAS_ALIGNED_ALLOC)
return std::aligned_alloc(align, (size + mask) & ~mask);
#else
return alignment::detail::aligned_alloc(align, (size + mask) & ~mask);
Expand Down
2 changes: 1 addition & 1 deletion include/proxsuite/linalg/veg/memory/placement.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

#if VEG_HAS_BUILTIN(__builtin_launder) || __GNUC__ >= 7
#define VEG_LAUNDER(p) (__builtin_launder(p))
#elif defined(VEG_WITH_CXX17_SUPPORT)
#elif defined(VEG_WITH_CXX17_SUPPORT) && __GNUC__ >= 6
#include <new>
#define VEG_LAUNDER(p) (::std::launder(p))
#else
Expand Down
Loading