Skip to content

Commit

Permalink
CL
Browse files Browse the repository at this point in the history
- Add compile-time type check for T and U using static_assert and isSameType.
  • Loading branch information
GabrielEValenzuela committed Aug 2, 2024
1 parent 03800a0 commit 36dfc9c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/shared_modules/utils/threadEventDispatcher.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class TThreadEventDispatcher
}
else
{
static_assert(isSameType,"T and U are not the same type");
static_assert(isSameType, "T and U are not the same type");
for (unsigned int i = 0; i < TNumberOfThreads; ++i)
{
m_threads.push_back(std::thread {
Expand Down Expand Up @@ -289,7 +289,7 @@ class TThreadEventDispatcher
*/
void multiAndUnordered()
{
static_assert(isSameType,"T and U are not the same type");
static_assert(isSameType, "T and U are not the same type");
std::queue<U> data; // Declare data outside the try block to ensure scope in catch block
try
{
Expand Down

0 comments on commit 36dfc9c

Please sign in to comment.