Type inconsistency

I actually did. It is not a showstopper problem since I was able to work around it but yet it is a problem:

I ended up writing some generic code to create some parameters (in my framework), with APIs like those:

template<typename T>
GUIParam<T> registerParam(ParamID iParamID); // ParamID == uint32

template<typename T>
GUIParam<T> registerParam(TagID iTagID) { // TagID == int32
  if(iTagID < 0)
    return {};
  else
   return registerParam<T>(static_cast<ParamID>(iTagID));
}

And then in a view (which inherits from CControl) I end up writing:

void registerParameters() {
  fMyParam = registerParam<T>(getTag());
}

And this code worked fine with macOS/XCode but failed on Windows / Visual Studio Build tools with an error telling me that the call was ambiguous. I can fix the issue by doing:

void registerParameters() {
  fMyParam = registerParam<T>(static_cast<TagID>(getTag()));
}

but that made me realize that there was an inconsistency between the types (on Windows) since int32_t and int32 are NOT the same type. I wished I didn’t have to explicitly cast the tag since it doesn’t seem right to me because it should represent the same type as used in the VST world… It also took me a long time to realize what the actual problem was (especially when dealing with templated code and error messages that are not very friendly). I am sure other people will bump into similar issues one day or another.