diff --git a/Threads/Inc/threads_actor.hpp b/Threads/Inc/threads_actor.hpp index 50c51b1..a3cd524 100644 --- a/Threads/Inc/threads_actor.hpp +++ b/Threads/Inc/threads_actor.hpp @@ -26,7 +26,7 @@ class Actor public: using value_type = T; - static_assert(std::is_trivially_constructible_v, "T must be trivially constructible."); + static_assert(std::is_default_constructible_v, "T must be default constructible."); static_assert(std::is_trivially_copyable_v, "T must be trivially copyable."); Actor(const std::uint32_t queue_size, const char* name, const osPriority_t priority, const std::uint32_t stack_size) @@ -57,7 +57,7 @@ private: { init(); - value_type data; + value_type data{}; while (true) { diff --git a/Threads/Inc/threads_signal.hpp b/Threads/Inc/threads_signal.hpp index 16dd49a..d6dd057 100644 --- a/Threads/Inc/threads_signal.hpp +++ b/Threads/Inc/threads_signal.hpp @@ -20,7 +20,8 @@ struct Signallable { using value_type = T; - static_assert(std::is_trivially_constructible_v, "T must be trivially constructible."); + static_assert(std::is_trivially_copyable_v, "T must be trivially copyable."); + static_assert(std::is_default_constructible_v, "T must be default constructible."); virtual bool emit(const T& t) = 0; virtual std::pair emitFromIsr(const T& t) = 0;