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 to Questions & Answers just mention UE-76843 in the post.

0
Login to Vote

Won't Fix
CreatedJul 2, 2019
ResolvedAug 27, 2021
UpdatedAug 27, 2021