This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: pair (or template class) in constuctor
- From: Levente Farkas <lfarkas at mindmaker dot hu>
- To: Phil Edwards <pedwards at disaster dot jaj dot com>,STDC++ <libstdc++ at sources dot redhat dot com>
- Date: Fri, 16 Nov 2001 14:59:29 +0100
- Subject: Re: pair (or template class) in constuctor
- Organization: Mindmaker Ltd.
- References: <3BF5181A.49EA4A51@mindmaker.hu> <20011116085100.B20383@disaster.jaj.com>
- Reply-to: lfarkas at mindmaker dot hu
Phil Edwards wrote:
>
> On Fri, Nov 16, 2001 at 02:43:54PM +0100, Levente Farkas wrote:
> > hi,
> > May be it's not a stdc++ question, but why the first type of constructor
> > do not compile with g++? and why the second compile?
> > -------------------
> > include <utility>
>
> When I tried your code, the missing '#' in '#include' was the only error.
> If you're seeing an error, you need to report the compiler version, and
> *give the text of the error*. The code worked fine for me using 3.0.2.
it can be a good news, may be I've to upgade to gcc3 (but I don't
realy would like to do so:-())
# g++ param.cpp
param.cpp:7: parse error before `>'
param.cpp:11: prototype for `A::A (pair<char *, long int>)' does not
match any in class `A'
param.cpp:9: candidates are: A::A ()
param.cpp:9: A::A (const A &)
# g++ -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs
gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-93)
-- Levente "Si vis pacem para bellum!"