Mail Archives: djgpp/2000/11/02/08:01:14
In article <3a009f41 DOT 55595835 AT news DOT freeserve DOT net>,
dontmailme AT iname DOT com wrote:
> Rudolf Polzer wrote:
>
> > BTW, there is another problem:
> >
> > std::map < ::Sound::Sound > ::iterator i = m.begin()
> >
> > gives an parse error, while
> >
> > typedef ::Sound::Sound Snd;
> > // ...
> > std::map < Snd > ::iterator i = m.begin()
> >
> > does not. Why?
> >
> > > > and recompiling in standard-compliant compilers fails.
>
> It's not surprising it fails in most compilers, since std::map needs
> at least two template arguments. But I can't get GCC to accept fewer
> than two either. Can you post a complete minimal example of a program
> that demonstrates this?
Sorry, it was a typo. It really was
map<::Entity::Entity *, ::Sound::Sound *>
And I just found out it was because <: is a digraph, and I accidentally
left out spaces.
>
> > And there seems to be another problem: When I switch on -Wall, my
> > programs do not compile any more with messages like this:
> >
> > In method `M<int>::M(const int &)':
> > test.cpp(12) Error: instantiated from here
> > test.cpp(6) Warning: statement with no effect
> > There were some errors
>
> That's strange. Why is "instantiated from here" an error?
> I tried compiling your example and I get this:
Compiling from commandline gave no error, and your message format. It
seems to be a RHIDE bug. Sorry.
>
> test.cpp: In method `M<int>::M(const int &)':
> test.cpp:12: instantiated from here
> test.cpp:6: warning: statement with no effect
>
> There are no errors and I get a working executable. Your compiler
> messages also have a different format than mine. What version
> of gcc are you using (gpp --version)?
>
gpp 2.952
gcc 2.952
gdb 4.18
--
Rudolf Polzer
REBOUNCE - http://www.mycgiserver.com/~rebounce
Sent via Deja.com http://www.deja.com/
Before you buy.
- Raw text -