Skip to content

[FUNCTION_WRAPPER] Add ostream overload approach#100

Draft
TheRedDaemon wants to merge 1 commit into
mainfrom
feature/ostream-overload-impl-concept
Draft

[FUNCTION_WRAPPER] Add ostream overload approach#100
TheRedDaemon wants to merge 1 commit into
mainfrom
feature/ostream-overload-impl-concept

Conversation

@TheRedDaemon
Copy link
Copy Markdown
Contributor

@TheRedDaemon TheRedDaemon commented Jun 2, 2026

Closes #28.

As draft first, since I went with a rather strange approach, I guess.
My thoughts were essentially:

  • I want to add overloads, maybe even for enums one day.
  • I want separate files.
  • I do not want them to compile in case of EXE.

I went with the not recommended, unusual cpp-include, building basically one cpp file that I added to core.
So I went with the most complicated first.

I can backpaddle if I overdid it:

  • We can leave out the mirror of the directory structure, assuming we will not have type name collisions.
  • We can leave out the "cpp" include approach and instead work with adding an additional cpp to core for every overload, ignoring the filter for dll/exe (might be overkill anyway).
  • We can go back to one file and only think about splitting again in case the file grows beyond 1000 or 2000 lines.

What do you think?

Being honest I was actually going with one file, but then I thought about the enums. But the enums as they are used in the function parameters are not enums currently, but aliased ints, etc, so as of now, there is nothing to gain by overloading enums anyway.
Unless we switch the int aliased enums in the function parameters to the actual enum type and only use the int version in case of structs...

@TheRedDaemon TheRedDaemon requested a review from gynt June 2, 2026 21:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[TEMPLATE] The "<<" operator is not guaranteed to be available for arbitrary types

1 participant