blob: 1f5e4037090e56de7d9f979938665feeac1a6610 [file] [log] [blame] [raw]
#include <type_traits>
#include <thread>
struct safetls
{
int val;
int x;
int y;
int value() {return val - x + y;}
};
thread_local safetls g{0x98765};
thread_local int h = 0x12345;
inline int func()
{
return g.value();
}
inline int func2()
{
return h;
}
int main()
{
return func() + func2();
}