TMap in function exposed as UFUNCTION for blueprint will not compile.

I am trying to expose a function to use in blueprints and cannot get it to compile. It’s complaining about the TMAP<FString, FString> argument and says error: ‘FString’ does not refer to a value. The function declaration looks like this:



UCLASS()
class TEST_API UTestFunctions : public UBlueprintFunctionLibrary
{
    GENERATED_UCLASS_BODY()
	
    UFUNCTION(BlueprintCallable, Category="MyFunctions")
    static void Test(const UObject* AnObject, const FString Filename, const TMap<FString, FString>& Manifest);	
};


the body has no implementation. The compiler is complaining about the declaration but seems happy with this declaration (just as a test):



UFUNCTION(BlueprintCallable, Category="MyFunctions")
static void Test(const UObject* AnObject, const FString Filename, const TArray<FString>& Manifest);


The error is:



Info ../../../../../ray/Documents/Unreal Projects/ProfileDataLibrary/Source/ProfileDataLibrary/Public/ProfileDataFunctions.h:15:2: error: 'FString' does not refer to a value
Info         GENERATED_UCLASS_BODY()
Info         ^
Info Runtime/CoreUObject/Public/UObject/ObjectMacros.h:615:36: note: expanded from macro 'GENERATED_UCLASS_BODY'
Info #define GENERATED_UCLASS_BODY(...) GENERATED_BODY_LEGACY()
Info                                    ^
Info Runtime/CoreUObject/Public/UObject/ObjectMacros.h:611:36: note: expanded from macro 'GENERATED_BODY_LEGACY'
Info #define GENERATED_BODY_LEGACY(...) BODY_MACRO_COMBINE(CURRENT_FILE_ID,_,__LINE__,_GENERATED_BODY_LEGACY)
Info                                    ^
Info Runtime/CoreUObject/Public/UObject/ObjectMacros.h:609:37: note: expanded from macro 'BODY_MACRO_COMBINE'
Info #define BODY_MACRO_COMBINE(A,B,C,D) BODY_MACRO_COMBINE_INNER(A,B,C,D)
Info                                     ^
Info note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
Info <scratch space>:18:1: note: expanded from here
Info ProfileDataLibrary_Source_ProfileDataLibrary_Public_ProfileDataFunctions_h_15_GENERATED_BODY_LEGACY
Info ^
Info ../../../../../ray/Documents/Unreal Projects/ProfileDataLibrary/Intermediate/Build/Mac/UE4Editor/Inc/ProfileDataLibrary/ProfileDataFunctions.generated.h:98:2: note: expanded from macro 'ProfileDataLibrary_Source_ProfileDataLibrary_Public_ProfileDataFunctions_h_15_GENERATED_BODY_LEGACY'
Info         ProfileDataLibrary_Source_ProfileDataLibrary_Public_ProfileDataFunctions_h_15_RPC_WRAPPERS \
Info         ^
Info ../../../../../ray/Documents/Unreal Projects/ProfileDataLibrary/Intermediate/Build/Mac/UE4Editor/Inc/ProfileDataLibrary/ProfileDataFunctions.generated.h:24:18: note: expanded from macro 'ProfileDataLibrary_Source_ProfileDataLibrary_Public_ProfileDataFunctions_h_15_RPC_WRAPPERS'
Info                 P_GET_TMAP_REF(FString,FString,Z_Param_Out_Manifest); \
Info                                ^
Info /Users/Shared/Epic Games/UE_4.16/Engine/Source/Runtime/Core/Public/Misc/Timespan.h:8:7: note: declared here
Info class FString;
Info       ^
Info In file included from /Users/ray/Documents/Unreal Projects/ProfileDataLibrary/Intermediate/Build/Mac/UE4Editor/Inc/ProfileDataLibrary/ProfileDataLibrary.generated.cpp:8:
Info In file included from ../../../../../ray/Documents/Unreal Projects/ProfileDataLibrary/Intermediate/Build/Mac/UE4Editor/Inc/ProfileDataLibrary/ProfileDataLibrary.generated.dep.h:9:
Info ../../../../../ray/Documents/Unreal Projects/ProfileDataLibrary/Source/ProfileDataLibrary/Public/ProfileDataFunctions.h:15:2: error: 'FString' does not refer to a value
Info         GENERATED_UCLASS_BODY()
Info         ^
Info Runtime/CoreUObject/Public/UObject/ObjectMacros.h:615:36: note: expanded from macro 'GENERATED_UCLASS_BODY'
Info #define GENERATED_UCLASS_BODY(...) GENERATED_BODY_LEGACY()
Info                                    ^
Info Runtime/CoreUObject/Public/UObject/ObjectMacros.h:611:36: note: expanded from macro 'GENERATED_BODY_LEGACY'
Info #define GENERATED_BODY_LEGACY(...) BODY_MACRO_COMBINE(CURRENT_FILE_ID,_,__LINE__,_GENERATED_BODY_LEGACY)
Info                                    ^
Info Runtime/CoreUObject/Public/UObject/ObjectMacros.h:609:37: note: expanded from macro 'BODY_MACRO_COMBINE'
Info #define BODY_MACRO_COMBINE(A,B,C,D) BODY_MACRO_COMBINE_INNER(A,B,C,D)
Info                                     ^
Info note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
Info <scratch space>:18:1: note: expanded from here
Info ProfileDataLibrary_Source_ProfileDataLibrary_Public_ProfileDataFunctions_h_15_GENERATED_BODY_LEGACY
Info ^
Info ../../../../../ray/Documents/Unreal Projects/ProfileDataLibrary/Intermediate/Build/Mac/UE4Editor/Inc/ProfileDataLibrary/ProfileDataFunctions.generated.h:98:2: note: expanded from macro 'ProfileDataLibrary_Source_ProfileDataLibrary_Public_ProfileDataFunctions_h_15_GENERATED_BODY_LEGACY'
Info         ProfileDataLibrary_Source_ProfileDataLibrary_Public_ProfileDataFunctions_h_15_RPC_WRAPPERS \
Info         ^
Info ../../../../../ray/Documents/Unreal Projects/ProfileDataLibrary/Intermediate/Build/Mac/UE4Editor/Inc/ProfileDataLibrary/ProfileDataFunctions.generated.h:24:26: note: expanded from macro 'ProfileDataLibrary_Source_ProfileDataLibrary_Public_ProfileDataFunctions_h_15_RPC_WRAPPERS'
Info                 P_GET_TMAP_REF(FString,FString,Z_Param_Out_Manifest); \
Info                                        ^
Info /Users/Shared/Epic Games/UE_4.16/Engine/Source/Runtime/Core/Public/Misc/Timespan.h:8:7: note: declared here
Info class FString;
Info       ^
Info In file included from /Users/ray/Documents/Unreal Projects/ProfileDataLibrary/Intermediate/Build/Mac/UE4Editor/Inc/ProfileDataLibrary/ProfileDataLibrary.generated.cpp:8:
Info In file included from ../../../../../ray/Documents/Unreal Projects/ProfileDataLibrary/Intermediate/Build/Mac/UE4Editor/Inc/ProfileDataLibrary/ProfileDataLibrary.generated.dep.h:9:
Info ../../../../../ray/Documents/Unreal Projects/ProfileDataLibrary/Source/ProfileDataLibrary/Public/ProfileDataFunctions.h:15:2: error: use of undeclared identifier 'Z_Param_Out_Manifest'
Info         GENERATED_UCLASS_BODY()
Info         ^
Info Runtime/CoreUObject/Public/UObject/ObjectMacros.h:615:36: note: expanded from macro 'GENERATED_UCLASS_BODY'
Info #define GENERATED_UCLASS_BODY(...) GENERATED_BODY_LEGACY()
Info                                    ^
Info Runtime/CoreUObject/Public/UObject/ObjectMacros.h:611:36: note: expanded from macro 'GENERATED_BODY_LEGACY'
Info #define GENERATED_BODY_LEGACY(...) BODY_MACRO_COMBINE(CURRENT_FILE_ID,_,__LINE__,_GENERATED_BODY_LEGACY)
Info                                    ^
Info Runtime/CoreUObject/Public/UObject/ObjectMacros.h:609:37: note: expanded from macro 'BODY_MACRO_COMBINE'
Info #define BODY_MACRO_COMBINE(A,B,C,D) BODY_MACRO_COMBINE_INNER(A,B,C,D)
Info                                     ^
Info note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
Info <scratch space>:18:1: note: expanded from here
Info ProfileDataLibrary_Source_ProfileDataLibrary_Public_ProfileDataFunctions_h_15_GENERATED_BODY_LEGACY
Info ^
Info ../../../../../ray/Documents/Unreal Projects/ProfileDataLibrary/Intermediate/Build/Mac/UE4Editor/Inc/ProfileDataLibrary/ProfileDataFunctions.generated.h:98:2: note: expanded from macro 'ProfileDataLibrary_Source_ProfileDataLibrary_Public_ProfileDataFunctions_h_15_GENERATED_BODY_LEGACY'
Info         ProfileDataLibrary_Source_ProfileDataLibrary_Public_ProfileDataFunctions_h_15_RPC_WRAPPERS \
Info         ^
Info ../../../../../ray/Documents/Unreal Projects/ProfileDataLibrary/Intermediate/Build/Mac/UE4Editor/Inc/ProfileDataLibrary/ProfileDataFunctions.generated.h:24:34: note: expanded from macro 'ProfileDataLibrary_Source_ProfileDataLibrary_Public_ProfileDataFunctions_h_15_RPC_WRAPPERS'
Info                 P_GET_TMAP_REF(FString,FString,Z_Param_Out_Manifest); \
Info                                                ^
Info In file included from /Users/ray/Documents/Unreal Projects/ProfileDataLibrary/Intermediate/Build/Mac/UE4Editor/Inc/ProfileDataLibrary/ProfileDataLibrary.generated.cpp:8:
Info In file included from ../../../../../ray/Documents/Unreal Projects/ProfileDataLibrary/Intermediate/Build/Mac/UE4Editor/Inc/ProfileDataLibrary/ProfileDataLibrary.generated.dep.h:9:
Info ../../../../../ray/Documents/Unreal Projects/ProfileDataLibrary/Source/ProfileDataLibrary/Public/ProfileDataFunctions.h:15:2: error: use of undeclared identifier 'Z_Param_Out_Manifest'
Info Runtime/CoreUObject/Public/UObject/ObjectMacros.h:615:36: note: expanded from macro 'GENERATED_UCLASS_BODY'
Info #define GENERATED_UCLASS_BODY(...) GENERATED_BODY_LEGACY()
Info                                    ^
Info Runtime/CoreUObject/Public/UObject/ObjectMacros.h:611:36: note: expanded from macro 'GENERATED_BODY_LEGACY'
Info #define GENERATED_BODY_LEGACY(...) BODY_MACRO_COMBINE(CURRENT_FILE_ID,_,__LINE__,_GENERATED_BODY_LEGACY)
Info                                    ^
Info Runtime/CoreUObject/Public/UObject/ObjectMacros.h:609:37: note: expanded from macro 'BODY_MACRO_COMBINE'
Info #define BODY_MACRO_COMBINE(A,B,C,D) BODY_MACRO_COMBINE_INNER(A,B,C,D)
Info                                     ^
Info note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
Info <scratch space>:18:1: note: expanded from here
Info ProfileDataLibrary_Source_ProfileDataLibrary_Public_ProfileDataFunctions_h_15_GENERATED_BODY_LEGACY
Info ^
Info ../../../../../ray/Documents/Unreal Projects/ProfileDataLibrary/Intermediate/Build/Mac/UE4Editor/Inc/ProfileDataLibrary/ProfileDataFunctions.generated.h:98:2: note: expanded from macro 'ProfileDataLibrary_Source_ProfileDataLibrary_Public_ProfileDataFunctions_h_15_GENERATED_BODY_LEGACY'
Info         ProfileDataLibrary_Source_ProfileDataLibrary_Public_ProfileDataFunctions_h_15_RPC_WRAPPERS \
Info         ^
Info ../../../../../ray/Documents/Unreal Projects/ProfileDataLibrary/Intermediate/Build/Mac/UE4Editor/Inc/ProfileDataLibrary/ProfileDataFunctions.generated.h:27:65: note: expanded from macro 'ProfileDataLibrary_Source_ProfileDataLibrary_Public_ProfileDataFunctions_h_15_RPC_WRAPPERS'
Info                 UProfileDataFunctions::Test(Z_Param_AnObject,Z_Param_Filename,Z_Param_Out_Manifest); \
Info                                                                               ^
Info In file included from /Users/ray/Documents/Unreal Projects/ProfileDataLibrary/Source/ProfileDataLibrary/Private/ProfileDataFunctions.cpp:3:
Info ../../../../../ray/Documents/Unreal Projects/ProfileDataLibrary/Source/ProfileDataLibrary/Public/ProfileDataFunctions.h:15:2: error: 'FString' does not refer to a value
Info         GENERATED_UCLASS_BODY()
Info         ^
Info Runtime/CoreUObject/Public/UObject/ObjectMacros.h:615:36: note: expanded from macro 'GENERATED_UCLASS_BODY'
Info #define GENERATED_UCLASS_BODY(...) GENERATED_BODY_LEGACY()
Info                                    ^
Info Runtime/CoreUObject/Public/UObject/ObjectMacros.h:611:36: note: expanded from macro 'GENERATED_BODY_LEGACY'
Info #define GENERATED_BODY_LEGACY(...) BODY_MACRO_COMBINE(CURRENT_FILE_ID,_,__LINE__,_GENERATED_BODY_LEGACY)
Info                                    ^
Info Runtime/CoreUObject/Public/UObject/ObjectMacros.h:609:37: note: expanded from macro 'BODY_MACRO_COMBINE'
Info #define BODY_MACRO_COMBINE(A,B,C,D) BODY_MACRO_COMBINE_INNER(A,B,C,D)
Info                                     ^
Info note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
Info <scratch space>:15:1: note: expanded from here
Info ProfileDataLibrary_Source_ProfileDataLibrary_Public_ProfileDataFunctions_h_15_GENERATED_BODY_LEGACY
Info ^
Info ../../../../../ray/Documents/Unreal Projects/ProfileDataLibrary/Intermediate/Build/Mac/UE4Editor/Inc/ProfileDataLibrary/ProfileDataFunctions.generated.h:98:2: note: expanded from macro 'ProfileDataLibrary_Source_ProfileDataLibrary_Public_ProfileDataFunctions_h_15_GENERATED_BODY_LEGACY'
Info         ProfileDataLibrary_Source_ProfileDataLibrary_Public_ProfileDataFunctions_h_15_RPC_WRAPPERS \
Info         ^
Info ../../../../../ray/Documents/Unreal Projects/ProfileDataLibrary/Intermediate/Build/Mac/UE4Editor/Inc/ProfileDataLibrary/ProfileDataFunctions.generated.h:24:18: note: expanded from macro 'ProfileDataLibrary_Source_ProfileDataLibrary_Public_ProfileDataFunctions_h_15_RPC_WRAPPERS'
Info                 P_GET_TMAP_REF(FString,FString,Z_Param_Out_Manifest); \
Info                                ^
Info /Users/Shared/Epic Games/UE_4.16/Engine/Source/Runtime/Core/Public/Misc/Timespan.h:8:7: note: declared here
Info class FString;
Info       ^
Info In file included from /Users/ray/Documents/Unreal Projects/ProfileDataLibrary/Source/ProfileDataLibrary/Private/ProfileDataFunctions.cpp:3:
Info ../../../../../ray/Documents/Unreal Projects/ProfileDataLibrary/Source/ProfileDataLibrary/Public/ProfileDataFunctions.h:15:2: error: 'FString' does not refer to a value
Info         GENERATED_UCLASS_BODY()
Info         ^
Info Runtime/CoreUObject/Public/UObject/ObjectMacros.h:615:36: note: expanded from macro 'GENERATED_UCLASS_BODY'
Info #define GENERATED_UCLASS_BODY(...) GENERATED_BODY_LEGACY()
Info                                    ^
Info Runtime/CoreUObject/Public/UObject/ObjectMacros.h:611:36: note: expanded from macro 'GENERATED_BODY_LEGACY'
Info #define GENERATED_BODY_LEGACY(...) BODY_MACRO_COMBINE(CURRENT_FILE_ID,_,__LINE__,_GENERATED_BODY_LEGACY)
Info                                    ^
Info Runtime/CoreUObject/Public/UObject/ObjectMacros.h:609:37: note: expanded from macro 'BODY_MACRO_COMBINE'
Info #define BODY_MACRO_COMBINE(A,B,C,D) BODY_MACRO_COMBINE_INNER(A,B,C,D)
Info                                     ^
Info note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
Info <scratch space>:15:1: note: expanded from here
Info ProfileDataLibrary_Source_ProfileDataLibrary_Public_ProfileDataFunctions_h_15_GENERATED_BODY_LEGACY
Info ^
Info ../../../../../ray/Documents/Unreal Projects/ProfileDataLibrary/Intermediate/Build/Mac/UE4Editor/Inc/ProfileDataLibrary/ProfileDataFunctions.generated.h:98:2: note: expanded from macro 'ProfileDataLibrary_Source_ProfileDataLibrary_Public_ProfileDataFunctions_h_15_GENERATED_BODY_LEGACY'
Info         ProfileDataLibrary_Source_ProfileDataLibrary_Public_ProfileDataFunctions_h_15_RPC_WRAPPERS \
Info         ^
Info ../../../../../ray/Documents/Unreal Projects/ProfileDataLibrary/Intermediate/Build/Mac/UE4Editor/Inc/ProfileDataLibrary/ProfileDataFunctions.generated.h:24:26: note: expanded from macro 'ProfileDataLibrary_Source_ProfileDataLibrary_Public_ProfileDataFunctions_h_15_RPC_WRAPPERS'
Info                 P_GET_TMAP_REF(FString,FString,Z_Param_Out_Manifest); \
Info                                        ^
Info /Users/Shared/Epic Games/UE_4.16/Engine/Source/Runtime/Core/Public/Misc/Timespan.h:8:7: note: declared here
Info class FString;
Info       ^
Info In file included from /Users/ray/Documents/Unreal Projects/ProfileDataLibrary/Source/ProfileDataLibrary/Private/ProfileDataFunctions.cpp:3:
Info ../../../../../ray/Documents/Unreal Projects/ProfileDataLibrary/Source/ProfileDataLibrary/Public/ProfileDataFunctions.h:15:2: error: use of undeclared identifier 'Z_Param_Out_Manifest'
Info         GENERATED_UCLASS_BODY()
Info         ^
Info Runtime/CoreUObject/Public/UObject/ObjectMacros.h:615:36: note: expanded from macro 'GENERATED_UCLASS_BODY'
Info #define GENERATED_UCLASS_BODY(...) GENERATED_BODY_LEGACY()
Info                                    ^
Info Runtime/CoreUObject/Public/UObject/ObjectMacros.h:611:36: note: expanded from macro 'GENERATED_BODY_LEGACY'
Info #define GENERATED_BODY_LEGACY(...) BODY_MACRO_COMBINE(CURRENT_FILE_ID,_,__LINE__,_GENERATED_BODY_LEGACY)
Info                                    ^
Info Runtime/CoreUObject/Public/UObject/ObjectMacros.h:609:37: note: expanded from macro 'BODY_MACRO_COMBINE'
Info #define BODY_MACRO_COMBINE(A,B,C,D) BODY_MACRO_COMBINE_INNER(A,B,C,D)
Info                                     ^
Info note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
Info <scratch space>:15:1: note: expanded from here
Info ProfileDataLibrary_Source_ProfileDataLibrary_Public_ProfileDataFunctions_h_15_GENERATED_BODY_LEGACY
Info ^
Info ../../../../../ray/Documents/Unreal Projects/ProfileDataLibrary/Intermediate/Build/Mac/UE4Editor/Inc/ProfileDataLibrary/ProfileDataFunctions.generated.h:98:2: note: expanded from macro 'ProfileDataLibrary_Source_ProfileDataLibrary_Public_ProfileDataFunctions_h_15_GENERATED_BODY_LEGACY'
Info         ProfileDataLibrary_Source_ProfileDataLibrary_Public_ProfileDataFunctions_h_15_RPC_WRAPPERS \
Info         ^
Info ../../../../../ray/Documents/Unreal Projects/ProfileDataLibrary/Intermediate/Build/Mac/UE4Editor/Inc/ProfileDataLibrary/ProfileDataFunctions.generated.h:24:34: note: expanded from macro 'ProfileDataLibrary_Source_ProfileDataLibrary_Public_ProfileDataFunctions_h_15_RPC_WRAPPERS'
Info                 P_GET_TMAP_REF(FString,FString,Z_Param_Out_Manifest); \
Info                                                ^
Info In file included from /Source/ProfileDataLibrary/Private/ProfileDataFunctions.cpp:3:
Info ../../../../../ray/Documents/Unreal Projects/ProfileDataLibrary/Source/ProfileDataLibrary/Public/ProfileDataFunctions.h:15:2: error: use of undeclared identifier 'Z_Param_Out_Manifest'
Info Runtime/CoreUObject/Public/UObject/ObjectMacros.h:615:36: note: expanded from macro 'GENERATED_UCLASS_BODY'
Info #define GENERATED_UCLASS_BODY(...) GENERATED_BODY_LEGACY()
Info                                    ^
Info Runtime/CoreUObject/Public/UObject/ObjectMacros.h:611:36: note: expanded from macro 'GENERATED_BODY_LEGACY'
Info #define GENERATED_BODY_LEGACY(...) BODY_MACRO_COMBINE(CURRENT_FILE_ID,_,__LINE__,_GENERATED_BODY_LEGACY)
Info                                    ^
Info Runtime/CoreUObject/Public/UObject/ObjectMacros.h:609:37: note: expanded from macro 'BODY_MACRO_COMBINE'
Info #define BODY_MACRO_COMBINE(A,B,C,D) BODY_MACRO_COMBINE_INNER(A,B,C,D)



What am I doing wrong? How can I pass a map to my function?

This has been fixed in 4.17, I think it was an oversight in 4.15 & 4.16 etc.

Yes, you are correct. I’m getting a different error but it seems to be the same issues as this bug