This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: g++ template functions calling template functions.
- From: David Sankel <camio at yahoo dot com>
- To: Claudio Bley <bley at cs dot uni-magdeburg dot de>, gcc-help at gcc dot gnu dot org
- Date: Tue, 20 Jan 2004 13:10:04 -0800 (PST)
- Subject: Re: g++ template functions calling template functions.
Claudio,
Thanks for your help. I was able to fix the bug realizing that the problem
was passing a temporary to a function that requires a non-const reference.
--- Claudio Bley <bley@cs.uni-magdeburg.de> wrote:
> I'm almost certain you were just too lazy... ;-)
I wish that were so :). Since I thought it was a problem with templates,
my test case didn't include other parameters. Seems as though a lot of
misdirection played a part here.
> You can't pass a temporary object to a function as a non-const
> reference. (Btw, what is msft c++ and does it accept this code?)
Microsoft C++. Visual Studio.NET 2003. Yeah, accepted this code without any
complaint.
Thanks Again,
David J. Sankel