|Re: [eigen] comma initializers, perfect forwarding and variadic templates|
[ Thread Index |
| More lists.tuxfamily.org/eigen Archives
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] comma initializers, perfect forwarding and variadic templates
- From: Massimiliano Janes <max.jns@xxxxxxxxx>
- Date: Tue, 25 Oct 2016 09:12:33 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:content-transfer-encoding:mime-version:subject:date:references :to:in-reply-to:message-id; bh=uq7qnJWh/92714AE/bC1J+fueQNjz4dq50vEIQJO8pE=; b=N7aIlTen6gK0eBrZ3LOtbaauSGHAvpkfFxEjKCWIbMOP7bPm3GHKg5HdGnHiUfN/45 sm9mBJRw3a/eoTq+6mfZQDlugTqD2wjoizXj3yPxpASPODDAc+A/O5sdh08RXlihDtLg DyzEHt80TEoDrYxhaVgJBJD/ELP6iSDTv8mrJ0NeJDcu0b3vtTUK0wXq+NMp1SqH6Hzn SmAjUvLFzznCKMeu0PZOixB5iFFvjY4PwPzPAlzl6FVAkp4IPn+r4ZeHdwbY7Hf8UyRY bmAwmTQh4CHEL071EBLzOX7UXpQNTWlIg4SYKh6hzBhmZWSKV6MMOOoVCcee1h4lM6eV tZ5A==
> On 25 Oct 2016, at 08:44, Gael Guennebaud <gael.guennebaud@xxxxxxxxx> wrote:
> this is interesting. API-wise, I'd rather go towards an alternative API to the current comma initializer syntax like:
I do agree, IMHO the worst thing about comma initialization is that the original intent is not explicit, but rather deduced from the final layout. This is error prone when mixing complex matrix views, especially in generic code.
That said, given what we have now, it’s reasonable to claim that the current initialization mechanism should be supported in all generic contexts, including parameters packs, hence something like what I suggested should be implemented anyway in my opinion.