mirror of
https://github.com/mutouyun/cpp-ipc.git
synced 2025-12-06 16:56:45 +08:00
refactor: Add static_assert for trivially copyable type in data_model
This commit is contained in:
parent
7ff608e101
commit
7e1731c5ef
@ -9,6 +9,7 @@
|
||||
#include <atomic>
|
||||
#include <array>
|
||||
#include <tuple>
|
||||
#include <type_traits>
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
|
||||
@ -26,6 +27,9 @@ LIBCONCUR_NAMESPACE_BEG_
|
||||
|
||||
template <typename T, typename TransModT, typename PRelationT, typename CRelationT>
|
||||
class data_model {
|
||||
|
||||
static_assert(std::is_trivially_copyable<T>::value, "T must be trivially copyable.");
|
||||
|
||||
public:
|
||||
using producer_relation_t = PRelationT;
|
||||
using consumer_relation_t = CRelationT;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user