3 ms·
I think the complexity to deliver an equivalent of Mutex<T> which also works via no_unique_address to deliver no-space-overhead for deliberately stateless types
by tialaramex 4y ago
I think the complexity to deliver an equivalent of Mutex<T> which also works via no_unique_address to deliver no-space-overhead for deliberately stateless types that would otherwise add 1 byte to the type size is probably a bit much to ask.
Thanks for pointing me to Boost synchronized_example<T> showing that this does exist, at least as an experimental library feature.
- gpderetta 4y agoIt is not exactly rocket science: https://gcc.godbolt.org/z/6Kz53bs7x https://gcc.godbolt.org/z/6Kz53bs7x. Bonus it supports visiting multiple synchronized at the same time, deadlock free.
- tialaramex 4y agoHuh. I was expecting that providing access to the no_unique_address value despite it not having an address would be much trickier than that.