This changes all __enable_ifs inside <string> to a common pattern. Specifically, it's always inside the template <> and uses the , int> = 0 style.
Details
Details
- Reviewers
ldionne Mordante EricWF - Group Reviewers
Restricted Project - Commits
- rG5b1145bc46e2: [libc++][NFC] Refactor the __enable_ifs in <string>
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
This increases code duplication substantially.
Please say why this refactoring is an improvement.
Comment Actions
@philnik Every single change needs a description. The description must include the motivation for making the change. What does in improve? What code does it break/fix? etc.
This is important for review, and its even more important down the road when we're trying to figure out why a particular change was made all that time ago.
Comment Actions
I am fine with this since:
- It increases consistency with the way we use enable_if elsewhere, and
- the duplication is going away once we implement those member functions in the class, which we should do anyway.
libcxx/include/string | ||
---|---|---|
2053 | There's a bit of duplication here, which is kind of annoying. However, refactoring this short function to be defined in-class will remove that duplication, and also remove some boilerplate which is not really useful. |