As I am not developing libcxx, I am not familiar with the process. However, I was wondering if it makes sense to add the following feature.
Clang provides experimental support for address spaces in C++ mode that are represented as type qualifiers (following ISO/IEC JTC1 SC22 WG14 N1169 Section 5.1.2). It would be convenient to have a utility to remove address space from the type just like other qualifiers e.g. remove_cv.
It is not part of any official spec and therefore I am adding double underscore prefix to the name. Also the feature is guarded on the compilation with Clang since address spaces in C++ is currently just a Clang extension.
The need for this feature has been discussed in:
https://llvm.org/PR42033
https://reviews.llvm.org/D69938#1745766
Any feedback is valuable!
The precedent in C++17 is that you should provide both __remove_address_space and __remove_address_space_t.
Please make the argument an unsigned long long, we don't want to artificially restrict the range here in case the attribute accepts something wider in the future.