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

Inconsistent use of reserved names #36

Open
jwakely opened this issue Jul 18, 2024 · 2 comments
Open

Inconsistent use of reserved names #36

jwakely opened this issue Jul 18, 2024 · 2 comments
Assignees

Comments

@jwakely
Copy link

jwakely commented Jul 18, 2024

https://github.com/beman-project/Optional26/blob/bfeb9080c0d9c501965ae857a1decf7ed74686f5/include/Beman/Optional26/optional.hpp#L255

This code mixes reserved names like _Args with non-reserved names like T, which is the worst case. It means standard libraries wouldn't be able to take the code and use it as-is, and it's undefined for users to include it.

@jwakely
Copy link
Author

jwakely commented Jul 18, 2024

template <typename T, typename _Up, typename... _Args>

template <class T_, class U_, class Other>

What's going on here?!

@steve-downey
Copy link
Member

Looking way back in my history, it looks like me fighting with compilers and trying to disambiguate which T and U was causing problems, before I gave up on the oldest compiler.

Will do a clean up pass on the current code to move everything to user space names, and attempt to regularize the conventions.

@steve-downey steve-downey self-assigned this Jul 18, 2024
This was referenced Jul 20, 2024
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

No branches or pull requests

2 participants