Skip to content

Missing method_ptrcall.hpp include in type_info.hpp causes compile errors when including TypedDictionary #1735

Description

@dementive

Godot version

4.4

godot-cpp version

4.4

System information

Arch Linux

Issue description

When including typed_dictionary.hpp I get a compiler error from type_info.hpp complaining about "In included file: explicit specialization of undeclared template struct 'PtrToArg'". Adding #include <godot_cpp/core/method_ptrcall.hpp> to the top of all of my files that use TypedDictionary fixed this, not a big deal but it took me a bit to figure out the problem since the error is kinda confusing. Ideally type_info.hpp should just include method_ptrcall.hpp so the error never happens.

Steps to reproduce

Create a file with this in it and look at the compiler errors:

#include "godot_cpp/variant/typed_dictionary.hpp"

struct Something {
    godot::TypedDictionary<int, int> test_dict;
};

Minimal reproduction project

N/A

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