Warning/error c4868 on project module *.cpp file

While compiling an unreal 4 project (unreal 4.11.2) on visual studio community edition 2015 (ver 14.0.25123.00 Update 2), I’m receiving following error:

2>..\BlightUE4\Intermediate\Build\Win64\UE4Editor\Inc\BlightUE4\BlightUE4.generated.cpp : error C4868: compiler may not enforce left-to-right evaluation order in braced initializer list
2>d:\development\tools\epic games\4.11\engine\source\runtime\coreuobject\public\uobject\class.h(535): error C4868: compiler may not enforce left-to-right evaluation order in braced initializer list
2>d:\development\tools\epic games\4.11\engine\source\runtime\coreuobject\public\uobject\class.h(874): error C4868: compiler may not enforce left-to-right evaluation order in braced initializer list
2>  Module.BlightUE4.cpp

BlightUE4.h::

#ifndef __BLIGHTUE4_H__
#define __BLIGHTUE4_H__

#include "EngineMinimal.h"

#endif

BlightUE4.cpp:

// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.

#include "BlightUE4.h"

IMPLEMENT_PRIMARY_GAME_MODULE( FDefaultGameModuleImpl, BlightUE4, "BlightUE4" );

The error is obviously a C4868 warning escalated to an error

Somewhere within that file there’s an initializer list, however, I’m unable to locate it because compiler is not being helpful in this case. How do I fix this? “#pragma warning (disable: 4868)” doesn’t work either.

Alright, since nobody responded.

When you run into this issue, it means taht someone in one of your headers there’s a class or structure with an initializer list.

The reason why error happens within *.generated.cpp is because ProjectName.h includes every header in the project, and is included into ProjectName.generated.cpp.

So, to fix the error, you’ll have to go t hrough every header and look for initializer lists, manually, without help from the compiler.

The end.