beman-project / optional26

Beman.Optional26: `std::optional` extensions targeting C++26
Apache License 2.0
14 stars 9 forks source link

Inconsistent use of reserved names #36

Open jwakely opened 3 months ago

jwakely commented 3 months ago

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 commented 3 months ago

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

template <class T_, class U_, class Other>

What's going on here?!

steve-downey commented 3 months ago

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.