GDS ports from C++ using templated type?

I want to define a few similar GDS-structs with small variances in the actual datatype.
Instead of copy-pasting the declaration I created a template class in C++, and created explicit instantiations for the needed types and created ports for those.
That all seems to compile OK, but the types don’t show up in PLCnext Engineer, after importing the updated .plcwx
The datatypes are listed in the .compmeta-file, generated in the build.
Something like this:

template <class T>
class TagValue {
  T value;
  // .. more fields 
} 
// IEC 61131-3 datatype aliases
using MyDINT = TagValue<Arp::int32>;   // 32-bit signed integer
using MyLINT = TagValue<Arp::int64>;   // 64-bit signed integer
using MyREAL = TagValue<Arp::float32>; // 32-bit floating point
using MyLREAL = TagValue<Arp::float64>; // 64-bit floating point
// Explicit template instantiations
template class TagValue<Arp::int32>;   // DINT
template class TagValue<Arp::int64>;   // LINT
template class TagValue<Arp::float32>; // REAL
template class TagValue<Arp::float64>; // LREAL
Port declaration in the Component itself:
  // #port
  // #attributes(Output|Retain)
  // #name(dintTag)
  MyNameSpace::MyDINT dintTag;

Is this not possible?

Hello RXQ,

I believe it could be possible. What version of PLCnext Engineer do you use?
Perhaps you can also send us the C++ library to support@phoenixcontact.nl so we can test this.

PLCnext Engineer 2025.0.3
(Build 8.0.417.0, Revision bdcdd564)
But the SDK is a bit older, I mainly test with AXCF1152_23.0.7.109, since that’s compatible with the simulator available.
I’ll see if I can create a small example project.