Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use cleaner references to STL classes #595

Merged
merged 1 commit into from
Nov 16, 2023
Merged

Use cleaner references to STL classes #595

merged 1 commit into from
Nov 16, 2023

Conversation

zeux
Copy link
Owner

@zeux zeux commented Nov 16, 2023

The explicit specification of default template arguments is repetitive and dates back to the versions of pugixml that tried to forward-declare all STL classes manually, which ran into issues with default arguments in some STL versions.

We've since abandoned this idea and use string/iosfwd includes, as such it should be fine to rely on default arguments.

Note: while we could use std::wstring, this had compatibility issues with some very early versions of Android SDK. Out of abundance of caution, we keep basic_i/ostream and basic_string in tact. We could use std::string but we might need to replace these in char8 mode if that ever gets merged.

The explicit specification of default template arguments is repetitive
and dates back to the versions of pugixml that tried to forward-declare
all STL classes manually, which ran into issues with default arguments
in some STL versions.

We've since abandoned this idea and use <string>/<iosfwd> includes, as
such it should be fine to rely on default arguments.

Note: while we could use std::wstring, this had compatibility issues
with some very early versions of Android SDK. Out of abundance of
caution, we keep basic_i/ostream and basic_string in tact. We could use
std::string but we might need to replace these in char8 mode if that
ever gets merged.
@zeux zeux merged commit cf466ce into master Nov 16, 2023
23 checks passed
@zeux zeux deleted the stl-defarg branch November 16, 2023 20:42
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.

None yet

1 participant