[libcxx-commits] [libcxx] [libc++] Replace `__compressed_pair` with `[[no_unique_address]]` (PR #76756)
Alexander Kornienko via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Sep 25 04:00:24 PDT 2024
alexfh wrote:
I found an interesting interaction between this and the `DoNotOptimize` from the Google Benchmark library: https://gcc.godbolt.org/z/4EKdf8EWP
In short, DoNotOptimize stopped compiling for std::unique_ptr with a custom deleter.
```
error: invalid lvalue in asm output
7 | asm volatile("" : "+r,m"(var) : : "memory");
| ^~~
<source>:30:3: note: in instantiation of function template specialization 'DoNotOptimize<std::unique_ptr<int[], Delete<int, std::allocator<int>>>>' requested here
30 | DoNotOptimize(ptr);
| ^
```
That seems to be quite a rare case though.
https://github.com/llvm/llvm-project/pull/76756
More information about the libcxx-commits
mailing list