Re: [eigen] matrix exponential with c++0x |

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]

*To*: eigen@xxxxxxxxxxxxxxxxxxx*Subject*: Re: [eigen] matrix exponential with c++0x*From*: Hauke Heibel <hauke.heibel@xxxxxxxxxxxxxx>*Date*: Thu, 3 Dec 2009 11:39:31 +0100*Dkim-signature*: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=A/D5Ki1QdF+7aNQYjhKhBSiaC1lyhPBmss8+bHPQx5k=; b=rv8GHL7BELyd/gRnvKKjlba4UkUFvdPC9VXJzKaBlMS4w0c2NH9RE66ZBd7+Ih8ueG hBI1BtyN2oA3aYI/bdFjwPbGDeTDIONo976pidMgvU66rMUAiTQbu6eSefT8gOJf0AIM Y+yE5+bMQZ8pCAD1ZIJB/VmYX/p66PnBjI9ds=*Domainkey-signature*: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=t9Obl9oknJ5JhuEurJWq6czKN8AZlLLy6D1PRR7XI8dBK/lS+aixBsyEd4d7ytky2b DUFg0jMp5OwaD6/pnaZeqldbp5IHEUVbuVnTPTl8bxJKWXDUUyxnlE5ghIal3BMWt5rI wuXcfCkPQCTIvIiPnHdBrdAe7xjSGKdEM75TU=

2009/12/3 Björn Piltz <bjornpiltz@xxxxxxxxxxxxxx>

Well, over here removing the 'typename' in front of _Function fixes the compilation for GCC.

typedef _Functor Functor;

You only need the typename when the type you want to redefine is a nested template type depending on the class's template parameters. Unfortunately, VC9 neither complains when the the typename keyword is missing nor when it is given and not required - both cases are treated as compilation errors by GCC.

- Hauke

The problem was that the template parameter named "Functor" clashed

with the class named "Functor". That is why I renamed the template

parameter. I only used the typedef to keep the lines changed to a

minimum. An alternative would be to rename the class.

I thought prepending "_" to template parameters was an Eigen standard

precisely to avoid name clashes when the names are very generic, like

_Scalar, _Rows, _Cols and _Options in class Matrix.

Anyhow, I'm sorry I broke compilation with GNU, I didn't bother

recompiling since the change was so trivial. I'll look into it.

Sorry, I didn't quite get that.

> Uh, and I know that Visual Studio accepts this without complaining - this is why I never really seem to learn it.

Well, over here removing the 'typename' in front of _Function fixes the compilation for GCC.

typedef _Functor Functor;

You only need the typename when the type you want to redefine is a nested template type depending on the class's template parameters. Unfortunately, VC9 neither complains when the the typename keyword is missing nor when it is given and not required - both cases are treated as compilation errors by GCC.

- Hauke

**Follow-Ups**:**Re: [eigen] matrix exponential with c++0x***From:*Thomas Capricelli

**Re: [eigen] matrix exponential with c++0x***From:*mmoll

**References**:**Re: [eigen] matrix exponential with c++0x***From:*Hauke Heibel

**Re: [eigen] matrix exponential with c++0x***From:*Björn Piltz

**Re: [eigen] matrix exponential with c++0x***From:*Thomas Capricelli

**Re: [eigen] matrix exponential with c++0x***From:*Hauke Heibel

**Re: [eigen] matrix exponential with c++0x***From:*Hauke Heibel

**Re: [eigen] matrix exponential with c++0x***From:*Björn Piltz

**Messages sorted by:**[ date | thread ]- Prev by Date:
**Re: [eigen] matrix exponential with c++0x** - Next by Date:
**Re: [eigen] matrix exponential with c++0x** - Previous by thread:
**Re: [eigen] matrix exponential with c++0x** - Next by thread:
**Re: [eigen] matrix exponential with c++0x**

Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |