Call to `GetTypeInfoStatic` is ambiguous in class Texture3D

The macro URHO3D_OBJECT in class Texture3D complains Call to GetTypeInfoStatic is ambiguous when I open the project in Clion, but it compiles well on VS2017.

So I find the generated preprocessed file use the method described on SO here and replace the macro,

		using ClassName = Texture3D;
		using BaseClassName = Texture;
		virtual Urho3D::StringHash GetType() const override { return GetTypeInfoStatic()->GetType(); }
		virtual const Urho3D::String& GetTypeName() const override { return GetTypeInfoStatic()->GetTypeName(); }
		virtual const Urho3D::TypeInfo* GetTypeInfo() const override { return GetTypeInfoStatic(); }
		static Urho3D::StringHash GetTypeStatic() { return GetTypeInfoStatic()->GetType(); }
		static const Urho3D::String& GetTypeNameStatic() { return GetTypeInfoStatic()->GetTypeName(); }
		static const Urho3D::TypeInfo* GetTypeInfoStatic()
			static const Urho3D::TypeInfo typeInfoStatic("Texture3D",BaseClassName::GetTypeInfoStatic());
			return &typeInfoStatic;

It turned out the code BaseClassName::GetTypeInfoStatic() cause this.

seems like Texture class does not define it’s owne GetTypeInfoStatic function, but inherit from Object/Resource/ResourceWithMetadata class, so it is ambigusou ??

It’s weird that VS does not report this issue
The same happens in class Texture2D

Does it fix the problem if you add URHO3D_OBJECT to Texture?

URHO3D_OBJECT(Texture, ResourceWithMetadata);
yes, it does

May I ask one more question?

Does the line 416 use CreateTexture2D(&textureDesc, nullptr, (ID3D11Texture2D**)&object_); not CreateTexture2D(&textureDesc, nullptr, (ID3D11Texture2D**)&object_.ptr_); for a particular purpose ?
I see the latter was used in class Texture3D and TextureCube

Non-functional typo, I think

Because object_ is an union, all share the same address memory :thinking: