disable feature not available on GCC < 5

This commit is contained in:
Alexey Rybalchenko 2016-12-19 10:25:53 +01:00 committed by Mohammad Al-Turany
parent a332d9fc83
commit 62df0b609b

View File

@ -234,7 +234,8 @@ class FairMQDevice : public FairMQStateMachine, public FairMQConfigurable
template<typename T> template<typename T>
inline FairMQMessagePtr NewSimpleMessage(const T& data) const inline FairMQMessagePtr NewSimpleMessage(const T& data) const
{ {
static_assert(std::is_trivially_copyable<T>::value, "The argument type for NewSimpleMessage has to be trivially copyable!"); // todo: is_trivially_copyable not available on gcc < 5, workaround?
// static_assert(std::is_trivially_copyable<T>::value, "The argument type for NewSimpleMessage has to be trivially copyable!");
T* dataCopy = new T(data); T* dataCopy = new T(data);
return fTransportFactory->CreateMessage(dataCopy, sizeof(T), FairMQSimpleMsgCleanup<T>, dataCopy); return fTransportFactory->CreateMessage(dataCopy, sizeof(T), FairMQSimpleMsgCleanup<T>, dataCopy);
} }