In a header I defined a class function like this:
struct SDL_Window; // Forward declaration
struct SomeClass
{
void createVulkanSurface(SDL_Window* SDL_window, VkInstance vkInstance, VkSurfaceKHR vkSurface);
};
So the compiler doesn't know what VkInstance and VkSurfaceKHR are. They are typedefs defined by a macro. They may be typed pointer, or a uint64_t, it's just a handle. I think the only safe thing (instead of forward declaring these and risking the types changing) is to include the vulkan.h header that defines these typedefs, but I don't want to do that because it's a big header and it'll also be included in anything I include my .h header in. I had the idea changing the function signature to:
void createVulkanSurface(SDL_Window* SDL_window, void* vkInstance, void* vkSurface);
And then in the .cpp where I define this function to cast back to VkInstance and VkSurface. I know this is safe as void* pointers can be converted to and from any pointer type. In the case the typedef is of a uint64_t then a cast to void* and back may narrow the value as a pointer is a signed integral type underlying it, isn't it?
Edit: I just thought, might it be better to take the arguments as uint64_t maybe?