From 39b380c8e06a01646a43a8c18c80b35711721cf8 Mon Sep 17 00:00:00 2001 From: Francisco Paisana Date: Wed, 12 Aug 2020 12:12:56 +0100 Subject: [PATCH] fix compilation issue for gcc version < 5 --- lib/include/srslte/adt/interval.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/include/srslte/adt/interval.h b/lib/include/srslte/adt/interval.h index c9fa448b0..0d96fbfe2 100644 --- a/lib/include/srslte/adt/interval.h +++ b/lib/include/srslte/adt/interval.h @@ -31,7 +31,10 @@ namespace srslte { template class interval { - static_assert(std::is_trivially_copyable::value, "Template argument T should be trivially copyable."); + // TODO: older compilers may not have defined this C++11 trait. +#if (defined(__clang__) && (__clang_major__ >= 5)) || (defined(__GNUG__) && (__GNUC__ >= 5)) + static_assert(std::is_trivially_copyable::value, "Expected to be trivially copyable"); +#endif public: T start;