Skip to content

TypedDictionary doesn't support Vector4(i) #1967

Description

@MoltenCoffee

Godot version

4.6.1-stable

godot-cpp version

41cfbd1

System information

Likely irrelevant: Windows 11 25H2 (26200.8117), Intel i7-11700F, 64GB RAM, NVIDIA RTX 3060 Ti

Issue description

TypedDictionary does not support using Vector4 and Vector4i:

<path>\godot-cpp\include\godot_cpp/variant/typed_dictionary.hpp(243): error C2039: 'get_class_static': is not a member of 'godot::Vector4i'
<path>\godot-cpp\include\godot_cpp/variant/vector4i.hpp(41): note: see declaration of 'godot::Vector4i'
<path>\godot-cpp\include\godot_cpp/variant/typed_dictionary.hpp(243): note: the template instantiation context (the oldest one first) is
src\resources\anim_cfg_resource.cpp(179): note: see reference to class template instantiation 'godot::TypedDictionary<godot::StringName,godot::Vector4i>' being compiled
<path>\godot-cpp\include\godot_cpp/variant/typed_dictionary.hpp(243): note: while compiling class template member function 'godot::TypedDictionary<godot::StringName,godot::Vector4i>::TypedDictionary(void)'
src\resources\anim_cfg_resource.cpp(196): note: see the first reference to 'godot::TypedDictionary<godot::StringName,godot::Vector4i>::TypedDictionary' in 'godot::AnimConfigResource::get_animation_configs_dict'
<path>\godot-cpp\include\godot_cpp/variant/typed_dictionary.hpp(243): error C3861: 'get_class_static': identifier not found
scons: *** [src\resources\anim_cfg_resource.windows.template_debug.x86_64.obj] Error 2
scons: building terminated because of errors.

Without digging too deep in the code, it seems to stem from typed_dictionary.hpp not including things like:

MAKE_TYPED_DICTIONARY_EXPANDED(m_type, m_variant_type, Vector4, Variant::VECTOR4)
MAKE_TYPED_DICTIONARY_EXPANDED(m_type, m_variant_type, Vector4i, Variant::VECTOR4I)

and

MAKE_TYPED_DICTIONARY(Vector4, Variant::VECTOR4)
MAKE_TYPED_DICTIONARY(Vector4i, Variant::VECTOR4I)

Steps to reproduce

TypedDictionary<StringName, Vector4i>

Minimal reproduction project

This felt unnecessary, I'll happily provided upon request.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions