Error: static assertion failed with "TAtomic is only usable with trivial types"

Hi everybody :slight_smile:
I just installed UE4.24.1 and I am running VS 2017 on a Windows 10 64bit

Even before I change anything to the a basic template project, I already get the error : static assertion failed with “TAtomic is only usable with trivial types”

The error comes from Atomic.h, in the External Dependencies. Actually there are two Atomic.h, the error comes from the second one, line 537:
static_assert(TIsTrivial<T>::Value, “TAtomic is only usable with trivial types”);

Can anybody help me out? Is it a known bug or am I doing something wrong? I googled it but didn’t find anything useful.
Thank you very much!

Hi there,

I think I am having the same issue:

UE4.24.1, VS2017, Win10 64bit

Uppon building I get the same static assertion failure which is also called from Atomic.h line 537. The errormessage also contains the following information pointing to Stats2.h line 1717:

*"detected during instantiation of class "TAtomic<T> [with T=const TStatIdData ]" at line 1717 of “\UE_4.24\Engine\Source\Runtime\Core\Public\Stats\Stats2.h”

Are you building from Visual Studio or by pressing the Compile button in the UE editor? I see this error often when building in VS, but it doesn’t seem to affect whether the build succeeds (when a build fails, there has always been another error). I don’t see this message when using the Compile button in the editor. Though I’m not certain what is causing it, if the build succeeds, I think you can safely ignore it.

While the build doesn’t fail, It would be great if this is fixed ASAP.
It’s not great to have to “whitelist” errors safe to ignore - the team should watch out te keep errors at 0 always, to not msis a single (new/relevant) one, instead of trying to keep it at ~1ish (whih might or might not be relevant)