New Features in C++26
lwn.net
lwn.net
i would actually wager that rcu in and of itself is almost at par with atomics and the memory-model :o)
for folks wondering about 'hazard-pointers' this paper https://web.archive.org/web/20171104135736/http://www.resear... is quite useful as an excellent starting point.
template <typename... T>
constexpr auto first_plus_last(T... values) -> T...[0] {
return T...[0](values...[0] + values...[sizeof...(values)-1]);
}
it seems there are 5 different kinds of uses of "...". 1. typename...
2. sizeof...
3. values...
4. T... representing multiple parameters in the formal parameter list.
5. T... for the type of the pack (supporting T...[0], the new feature).
I don't have a big point, I'm just mildly amused. Even with the simplifying new syntax, it took me a while to work through what is what in the example.I wonder why it's T...[0] and not just T[0]? In parameter lists you need the distinction between "T", a single parameter of pack type, and "T...", multiple parameters supplied from the pack. But I don't see a similar need in an expression.