mirror of
https://github.com/joyieldInc/predixy.git
synced 2026-02-05 01:42:24 +08:00
18 lines
383 B
C++
18 lines
383 B
C++
/*
|
|
* Compile-only test to ensure Handler::mStop is atomic.
|
|
*/
|
|
|
|
#define private public
|
|
#include "../src/Handler.h"
|
|
#undef private
|
|
|
|
#include <type_traits>
|
|
#include <utility>
|
|
|
|
int main() {
|
|
using StopType = decltype(std::declval<Handler>().mStop);
|
|
static_assert(std::is_same<StopType, Atomic<bool>>::value,
|
|
"Handler::mStop should be atomic");
|
|
return 0;
|
|
}
|