Description

When you have a non-inlined ufunction, UHT fails to parse the restrict keyword in its parameter list.

 

Note: The following compiles (notice that the only change is the use of the FORCEINLINE keyword):

FORCEINLINE UFUNCTION()

void TestFunction(const FVector& RESTRICT Location1, const FVector& RESTRICT Location2){}

The following would also compile (notice the removal the UFUNCTION() specifier):

void TestFunction(const FVector& RESTRICT Location1, const FVector& RESTRICT Location2)
{}
Steps to Reproduce
  1. Create a new blank C++ project in Unreal.
  2. Create a new C++ class of type Actor
  3. Within the Actor's header file, declare the following function. 
 UFUNCTION()
void TestFunction(const FVector& RESTRICT Location1, const FVector& RESTRICT Location2);

Result: error : Missing ')' in parameter list

 

Expected: No error expected

Have Comments or More Details?

There's no existing public thread on this issue, so head over toAnswerHub just mention UE-76843 in the post.

0
Login to Vote

Unresolved
ComponentCore - UnrealHeaderTool
Affects Versions4.214.224.23
CreatedJul 2, 2019
UpdatedJul 8, 2019