From e5533e4bcd0428849cf333ba18c54a829fe36c78 Mon Sep 17 00:00:00 2001 From: Francisco Paisana Date: Mon, 4 May 2020 14:23:13 +0100 Subject: [PATCH] gcc 4.8.5 does not have std::max_align_t --- lib/include/srslte/common/move_callback.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/lib/include/srslte/common/move_callback.h b/lib/include/srslte/common/move_callback.h index 9e522a0f3..0f6b5afbb 100644 --- a/lib/include/srslte/common/move_callback.h +++ b/lib/include/srslte/common/move_callback.h @@ -36,6 +36,17 @@ namespace srslte { +// NOTE: gcc 4.8.5 is missing std::max_align_t. Need to create a struct +union max_alignment_t { + char c; + float f; + uint32_t i; + uint64_t i2; + double d; + long double d2; + uint32_t* ptr; +}; + //! Size of the buffer used by "move_callback" to store functors without calling "new" constexpr size_t default_buffer_size = 32; @@ -120,7 +131,7 @@ template class move_callback { static constexpr size_t capacity = Capacity >= sizeof(void*) ? Capacity : sizeof(void*); ///< size of buffer - using storage_t = typename std::aligned_storage::type; + using storage_t = typename std::aligned_storage::type; using oper_table_t = task_details::oper_table_t; static constexpr task_details::empty_table_t empty_table{};