[Gecode] friend template <foo> bar

Christian Schulte schulte at imit.kth.se
Thu Sep 9 16:02:18 CEST 2004


You are absolutely right: I should have written what you say. That also
works for MSVC. 

Interestingly, also what I wrote is legal but not needed in this case. I
guess that gcc has no built-in alpha-renaming for template variables...

Christian

--
Christian Schulte, http://www.imit.kth.se/~schulte/ 

-----Original Message-----
From: gecode-bounces at ps.uni-sb.de [mailto:gecode-bounces at ps.uni-sb.de] On
Behalf Of Gabor Szokoli
Sent: Thursday, September 09, 2004 3:57 PM
To: Technical discussions about Gecode
Subject: [Gecode] friend template <foo> bar


Hi Christian!

In kernel/core.hh class Variable, you declare a template instance as 
friend like this:

template <VarTypeId VTI, PropCond PC> friend class VarTypeProcessor;

but gcc strongly prefers this notation:

friend class VarTypeProcessor<VTI, PC>;

(read: rejects the first.)
Is MSC comfortable with this alternative?


Gabor
_______________________________________________
Gecode mailing list
Gecode at ps.uni-sb.de http://www.ps.uni-sb.de/mailman/listinfo/gecode




More information about the gecode-users mailing list