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

Normalization of stdlib inline namespace names #3119

Merged
merged 2 commits into from
Sep 29, 2022

Conversation

phprus
Copy link
Contributor

@phprus phprus commented Sep 27, 2022

libc++ inline namespace:

std::__1::system_error                        ->  std::system_error
std::__1::__fs::filesystem::filesystem_error  ->  std::filesystem::filesystem_error

libstdc++ inline namespace:

std::__cxx11::system_error                 ->  std::system_error
std::filesystem::__cxx11::filesystem_error ->  std::filesystem::filesystem_error

Copy link
Contributor

@vitaut vitaut left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR. I wonder if it would be better to remove all namespace components that start with __ instead of hardcoding specific cases?

@phprus
Copy link
Contributor Author

phprus commented Sep 27, 2022

I think you are right.
Since the __cxa_demangle allocates memory, the replacement can be making in place.

I will make changes in PR.

@phprus
Copy link
Contributor Author

phprus commented Sep 28, 2022

@vitaut
Implemented

Copy link
Contributor

@vitaut vitaut left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just a few nits.

include/fmt/std.h Outdated Show resolved Hide resolved
include/fmt/std.h Outdated Show resolved Hide resolved
@vitaut vitaut merged commit ad91cab into fmtlib:master Sep 29, 2022
@vitaut
Copy link
Contributor

vitaut commented Sep 29, 2022

Thanks!

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.

2 participants