UProperty and direct-list-initialization

I’ve tried to use direct-list-initialization with a replicated member variable


    UPROPERTY(Replicated, EditAnywhere, Category = "MyCat")
    int examplePrimitiveType{ 1 };


which is valid C++ syntax. However Visual C++ is throwing Missing ‘;’ in ‘variable declaration’. I assume, the macro resolution of UProperty doesn’t support it or am I missing something?

Copy-list-initialization compiles:


    UPROPERTY(Replicated, EditAnywhere, Category = "MyCat")
    int examplePrimitiveType = { 1 };

Just use the new and improved version of the syntax and write it like this:



UPROPERTY(Replicated, EditAnywhere, Category = "MyCat")
int32 ExamplePrimitiveType = 1;