aaron.ballman added a comment.

In D116203#3436572 <https://reviews.llvm.org/D116203#3436572>, @cjdb wrote:

> Having `__remove_cv` do more than it's advertised to do doesn't sound like a 
> great idea to me. Both libc++ 
> <https://github.com/llvm/llvm-project/blob/main/libcxx/include/type_traits#L647>
>  and libstdc++ 
> <https://github.com/gcc-mirror/gcc/blob/master/libstdc%2B%2B-v3/include/std/type_traits#L1561>
>  define `std::remove_cv` without extensions, and I think it would be 
> surprising for `__remove_cv` to remove anything else.
>
> I'm not against adding `__remove_restrict`, `__remove_qualifiers` (although 
> "qualifier" could imply ref-qualifiers too?), etc.. I suppose that in the 
> rare case someone wants to remove `volatile restrict` and keep `const&`, it's 
> possible to do `__add_const(__remove_qualifiers(T)&)`.

Sorry, I was really unclear it seems. I was recommending we end up with:

`__remove_const`
`__remove_volatile`
`__remove_restrict`
`__remove_cv`  // Removes just `const` and `volatile`
`__remove_qualifiers` // Removes all qualifiers

and if we someday find a use for adding `__remove_cvr` we can add it (but I 
would be surprised if the need was that great).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D116203

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to