Ugly c++ syntax

user1234 user1234 at 12.de
Sat Feb 6 09:01:05 UTC 2021


On Friday, 5 February 2021 at 21:10:21 UTC, Rumbu wrote:
> 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.

modern cpp looks like 10 lines of decl for 1 of actual code.


More information about the Digitalmars-d-learn mailing list