Re: [eigen] still the solve() API debate |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] still the solve() API debate
- From: Benoit Jacob <jacob.benoit.1@xxxxxxxxx>
- Date: Fri, 11 Sep 2009 11:17:04 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=NCNQVjW1NKdf8+lorRmiVfuaqUZOcqnOa2PK8w9ppyI=; b=YI06WSOxt/SpV0FUueRwZUSS6XAFdLXSd1X1tVlypHCmEYc4MVGU+t4WH/wULFWTo2 6y47ajXpjHoTE2brrQBBouWz5NX8vFQmd2BLSv1sB+Aishnlz3QlA2slKmJ/Go2qoQ9h 6CLNs2t1j+fNs4pC+aFMTM79Y14SyvUldmXec=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=Jt65CCV9H4WjKM2CNkDAp1GSiWbVizpziN/aSfYdqrVUWcALxy5mcnRB/axe2sTqWs 0zeM5rhj/fFSqWfpnPgZ1/K953+0LFmJHQVfCOI/bD4AIoZEMdSnH+TcUy4Hv/Y5ZqwD zB9nhs0wzbOYd6zkwI7AQL968BeY8+kWUjtW4=
2009/9/11 Hauke Heibel <hauke.heibel@xxxxxxxxxxxxxx>:
> On Fri, Sep 11, 2009 at 4:03 PM, Gael Guennebaud
> <gael.guennebaud@xxxxxxxxx> wrote:
>> template<OtherDerived> MatrixBase::swap(INOUT MatrixBase<OtherDerived>& other);
>
> Like this
>
> template<OtherDerived>
> MatrixBase::swap(MatrixBase<OtherDerived> INOUT & other);
>
> we could adapt it to rvalue references when they are supported by
>
> #define INOUT &
>
> and the docs are still fine...
OK, coming back to seriousness: I like your idea, I'm just not sure
about the INOUT name. Maybe the more verbose EIGEN_REF_TO_TEMPORARY
would be more explicit as to what it does and why we have to do it?
+1 to Hauke's idea to keep rvalue refs in mind; but then if we want
something flexible, instead of a macro we can even have a template
struct, if you want. It would look heavy in the dox, but if you want
we could make it look arbitrarily differently in the dox by definining
symbols in doxygen and using expand_as_defined.
Benoit