[libcxx-commits] [PATCH] D139270: [libc++] Rename __tuple to __tuple2 to avoid file collision

Tom Honermann via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Dec 12 10:01:16 PST 2022


tahonermann added a comment.

> Package managers track all installed files, and remove files that are no longer installed by the specific package version. However, the removal happens *after* installing the new version.

Thank you; that resolves my concern about package managers neglecting to remove outdated files.

> Yes, Gentoo can workaround this, and every other distribution out there can also probably work around this. The problem is: why does everyone has to repeatedly add complex workarounds when this can be resolved here trivially, so that things "just work" for everyone?

That question can be turned around; why should software authors need to rename their source files to work around deficiencies in package managers?

Part of my reaction is due to dislike for the proposed names. It is somewhat common to tag a number on to the end of a file name to indicate a new version of some feature, often one that is incompatible or risky in some way. In this case, source files are just being reorganized; the interface isn't changing. The "2" is confusing in that respect. I'm not fond of "__tuple_dir" either as the "_dir" part is redundant and doesn't add any additional information.

I took a closer look at the files in the "__tuple" directory. None of them are directly included by the "tuple" header. They all appear to be related to support for tuple-like types in general; not to the implementation of `std::tuple`. That suggests names like "__tuple_protocol", "__tuple_support", or "__tuple_like" might be more appropriate. If @ldionne is supportive of any of those names (or something similar), I'll have no objection to a rename.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D139270/new/

https://reviews.llvm.org/D139270



More information about the libcxx-commits mailing list