philnik777 wrote:

I'd personally be fine with deprecating it. As I said above, we use it in 
libc++ for padding inside `string` like
```c++
struct short_string {
  <some data>;
  char padding[sizeof(value_type) - 1];
  <more data>;
};
```
That could be refactored relatively easily as
```c++
template <size_t Size>
struct padding_t {
  char data[Size];
};

template <>
struct padding_t<0> {};

struct short_string {
  <some data>;
  [[no_unique_address]] padding_t<sizeof(value_type) - 1> padding;
  <more data>;
};

```
so I don't think that's a use-case worth keeping the extension for.

https://github.com/llvm/llvm-project/pull/86652
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to