godotengine / godotengine/godot-cpp
Forward declarations of godot-cpp classes.
- Dominant language
- C++
- Stars
- 2.7k
- Forks
- 809
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 8
Description
### Godot version
v4.1.1.stable.custom_build [bd6af8e0e]
### godot-cpp version
4.1 4eed2d7be017ef06521665604990114c9fff7c77
### System information
Godot v4.1.1.stable (bd6af8e0e) - Linux Mint 21.2 (Victoria) - Vulkan (Forward+) - integrated Intel(R) Graphics (RPL-P) () - 13th Gen Intel(R) Core(TM) i7-1360P (16 Threads)
### Issue description
When declaring, in a header file, a class member that is a pointer to a godot class, e.g. `::godot::Node * pointerToNode`, I need to either `#include ` or add something like
namespace godot
{
class Node;
}
I prefer the latter, because the `#include` slows down compilation. A godot header file with forward declarations for all godot classes would be nice.
I previously asked a question here: https://godotforums.org/d/36916-c-forward-declarations-for-godot-classes
### Steps to reproduce
I hope you don't mind asking for this enhancement here, I thought of adding it to the godot repository itself, but it seems to me this issue is very much related to godot-cpp. Please let me know if I should file this issue elsewhere.
### Minimal reproduction project
Any project will do.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.