|Re: [eigen] Passing result of block() as non-const reference-to-matrix?|
[ Thread Index |
| More lists.tuxfamily.org/eigen Archives
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] Passing result of block() as non-const reference-to-matrix?
- From: Gael Guennebaud <gael.guennebaud@xxxxxxxxx>
- Date: Fri, 9 Jul 2010 19:27:19 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:content-type; bh=QYHtNHtdsGcAMuLRdhhPZSosYpLLwuKuEpswbQU6nmQ=; b=VvnrNKjYPm3Ao8ZPI67xxu0eyUA8TvO5AUFrrH8OEN2odmv1j8VXVu9pGsaMrh4/ja WMGmIqX3fGYmJ6CpH0Sz6CdXKFjUs4junyXavU3XR9jw3484k3LAYgE4aaIboUzCILhL xPVugwNcWYly6CX5EkEDnpG/ymvPJ3wk0D6Ss=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=oivSBwx031mLlsircKsSIi044MM+qSUwIP49ViahII0CZj0cb4QuNoidwvRpRssAu+ rPdtj2LmibEhFfTNUK6/hAjflUbpHvqzMSySfN42zGtoutMl48kvhP4uktxK+SBTVLN6 zYrFtUgT702ZvZ7l/AFzv1jqqunuumvXBlFyc=
On Fri, Jul 9, 2010 at 7:03 PM, Benoit Jacob <jacob.benoit.1@xxxxxxxxx> wrote:
>> It's a pity that there is no clean solution that is portable to pre-C++0x. I still don't quite get that it does work as expected when I pass a const Block to a const Matrix & -- it is not clear for me why that /does/ work.
> That does /not/ work :-)
that does work ;) The block expression will be evaluated into a
temporary Matrix object. (unless the Matrix<> type is templated as
well but this is not the case in his example)