[libcxx-commits] [PATCH] D76636: [RFC] Added type trait to remove address space qualifier from type

Anastasia Stulova via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Dec 18 10:26:57 PST 2020


Anastasia added inline comments.


================
Comment at: libcxx/include/type_traits:713
+template <class _Tp> struct __remove_address_space<_Tp> { typedef _Tp type; };
+template <class _Tp, int I> struct __remove_address_space<_Tp __attribute__((address_space(I)))> { typedef _Tp __attribute__((address_space(I))) type; };
+#endif
----------------
rjmccall wrote:
> 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.
The pattern is incorrect!


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

https://reviews.llvm.org/D76636



More information about the libcxx-commits mailing list