TypedDictionary doesn't support Vector4(i)
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
Research direction
Start in include/godot_cpp/variant/typed_dictionary.hpp and reproduce the issue with TypedDictionary<StringName, Vector4i>. Compare the typed-dictionary macro expansions with the Vector4 and Vector4i variant definitions. Done when both vector types instantiate without the reported compiler errors and the project builds successfully.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- C++
- Stars
- 2.7k
- Forks
- 810
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 8
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from godotengine/godot-cpp
-
enhancement topic:buildsystem
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
godotengine/godot-cpp#2002 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
godotengine/godot-cpp#1969 · 4 comments ·
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 50/100
godotengine/godot-cpp#2042 ·
-
bug crash
Difficulty 4/5 3-5 days Newbie friendliness 35/100
godotengine/godot-cpp#2024 · 5 comments ·
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 35/100
godotengine/godot-cpp#2004 · 3 comments ·
All issues in godotengine/godot-cpp
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
AXERA-TECH/ax-llm#77 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
games-on-whales/wolf#509 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
bug-unconfirmed
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
NVIDIA/cuda-samples#453 ·