4 ms·
auto count = (std::size_t(0) + ... + (pred(ts) ? 1 : 0)); // expands to: std::size_t(0) + (pred(ts[0]) ? 1 : 0) // + (pred(ts[1])
by majewsky 6y ago
auto count = (std::size_t(0) + ... + (pred(ts) ? 1 : 0));
// expands to: std::size_t(0) + (pred(ts[0]) ? 1 : 0)
// + (pred(ts[1]) ? 1 : 0)
// + ...
My deepest sympathies to the person who has to fix bugs in that kind of codebase 10 years from now.
- a1369209993 6y ago(Read this before TFA; after multiple minutes of staring:) > auto count = (std::size_t(0) + ... + (pred(ts) ? 1 : 0)); Wait that's literal, non-metasyntacic elipses? What the actual fuck!?