predixy/test/logger_stop_atomic.cpp
2026-01-15 16:29:08 +01:00

18 lines
379 B
C++

/*
* Compile-only test to ensure Logger::mStop is atomic.
*/
#define private public
#include "../src/Logger.h"
#undef private
#include <type_traits>
#include <utility>
int main() {
using StopType = decltype(std::declval<Logger>().mStop);
static_assert(std::is_same<StopType, Atomic<bool>>::value,
"Logger::mStop should be atomic");
return 0;
}