This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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: pair (or template class) in constuctor


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!"


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