Ugly c++ syntax

Rumbu rumbu at rumbu.ro
Fri Feb 5 21:10:21 UTC 2021


Can some C++ guru translate in D the template below?

I gave up after reading a lot, but I didn't manage to understand 
the meaning "&& ..."

template <typename...Tables> static uint8_t 
composite_index_size(Tables const&... tables) { return 
(composite_index_size(tables.size(), 
impl::bits_needed(sizeof...(tables))) && ...) ? 2 : 4; }

Thanks.


More information about the Digitalmars-d-learn mailing list