Re: Ugly c++ syntax

2021-02-06 Thread user1234 via Digitalmars-d-learn
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 static uint8_t composite_index_size(Tables const&... tables) { return

Re: Ugly c++ syntax

2021-02-06 Thread Rumbu via Digitalmars-d-learn
On Saturday, 6 February 2021 at 00:35:12 UTC, Ali Çehreli wrote: On 2/5/21 1:10 PM, Rumbu wrote: I gave up after reading a lot, but I didn't manage to understand the meaning "&& ..." I think it's the universal reference. Thank you Ali, but nope, it's "parameter pack folding". This allows

Re: Ugly c++ syntax

2021-02-05 Thread Ali Çehreli via Digitalmars-d-learn
On 2/5/21 1:10 PM, Rumbu wrote: I gave up after reading a lot, but I didn't manage to understand the meaning "&& ..." I think it's the universal reference. template static uint8_t composite_index_size(Tables const&... tables) { return (composite_index_size(tables.size(),

Ugly c++ syntax

2021-02-05 Thread Rumbu via Digitalmars-d-learn
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 static uint8_t composite_index_size(Tables const&... tables) { return (composite_index_size(tables.size(),