From b042ce80bd436551756d582e3206b1e89fd1f7c1 Mon Sep 17 00:00:00 2001 From: Bert Wesarg Date: Tue, 17 Dec 2019 12:30:16 +0100 Subject: [PATCH] avoid non-standard `__attribute__`, instead use C++ `alignas` See https://en.cppreference.com/w/cpp/language/alignas --- dash/include/cpp17/polymorphic_allocator.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/dash/include/cpp17/polymorphic_allocator.h b/dash/include/cpp17/polymorphic_allocator.h index 8dd0fab3e..967c1c0f6 100644 --- a/dash/include/cpp17/polymorphic_allocator.h +++ b/dash/include/cpp17/polymorphic_allocator.h @@ -141,16 +141,16 @@ struct aligned_chunk<8> { long long x; }; template <> -struct aligned_chunk<16> { - __attribute__((aligned(16))) char x; +struct alignas(16) aligned_chunk<16> { + char x; }; template <> -struct aligned_chunk<32> { - __attribute__((aligned(32))) char x; +struct alignas(16) aligned_chunk<32> { + char x; }; template <> -struct aligned_chunk<64> { - __attribute__((aligned(64))) char x; +struct alignas(16) aligned_chunk<64> { + char x; }; // Adaptor to make a polymorphic allocator resource type from an STL allocator