fix compilation issue for gcc version < 5

This commit is contained in:
Francisco Paisana 2020-08-12 12:12:56 +01:00
parent 2f689372dd
commit 39b380c8e0
1 changed files with 4 additions and 1 deletions

View File

@ -31,7 +31,10 @@ namespace srslte {
template <typename T>
class interval
{
static_assert(std::is_trivially_copyable<T>::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<T>::value, "Expected to be trivially copyable");
#endif
public:
T start;