This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Parse error with member templates


I guess I'm not up to date with the standard either. I've never seen that syntax before. That fixes things right up with all the compilers I have at my disposal, though. Wow.

-Patrick

Loren James Rittle wrote:
In article <3D88FAF9.4010705@137.org> you write:


SGI's MIPSpro Compilers 7.3.1.3m compiles the code fine, and so does MS Visual C++ 7 (!). Most of the time, GCC 3.x blows both of these out of the water, and thus my surprise when I got the above error. I couldn't find a PR relating to this, so I am wondering if this is this a known problem.

Just because another compiler compiles your code, that doesn't make
them better (just less up-to-date with the standard, in this case ;-)

Try this implementation of B<T>::toString():

   std::string toString() const
   {
      return mObj.template getValue<std::string>();
   }


--
Patrick L. Hartling | Research Assistant, VRAC
patrick@137.org | 2274 Howe Hall Room 2624
PGP: http://www.137.org/patrick/pgp.txt | T: +1.515.294.4916
http://www.137.org/patrick/ | http://www.vrac.iastate.edu/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]