Function defined in header causes "already defined"

When including a library to use in UE, one of the headers defines a simple function to call a structs values. Its used through templating so that the code only expects the function to exist and does’t care about the struct. However the inclusion of this function definition cause a “already defined” error between the .gen.cpp file and the .cpp for an an Actor. Basically its like this:

header.h

#ifndef _Test_Struct_h_
#define _Test_Struct_h_

struct Test
{
   int value;
};

int getValue(const Test &test){return test.value;}

#endif

in some template code somewhere it is used like this:

template<typename _Data> void useData(_Data &data){int value=getValue(data);}

unfortunately when this file is included in the header for the Actor the getValue function gets compiled into both actor.gen.cpp.obj and actor.cpp.obj files causing the error. In normal operation this would not be a problem as there would only be one .obj for the class (and the header has header guards). However with all the UE’fu its causing a problem. Is there a way around this outside of moving everything to some class that is not part of th UE’fu? I know the function could also be declared in the header and defined in a cpp somewhere but the library is expecting it in the header with the hopes that the compiler would inline the function rather than making a call.

Edit
also tried with the following (hoping template instantiation might save me), same issue though.

template<typename _Class>
int getValue(const _Class& test){return 0;}

template<>
int getValue<Test>(const Test &test){return 0;}

Never mind, found my own answer, just need to declare the functions inline.

inline int getValue(const Test &test){return test.value;}

There is also FORCEINLINE macro. https://answers.unrealengine.com/questions/194095/forceinline-vs-inline.html
(mark your answer as correct, so it clear it is resolved issue).