 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Tamas Demjen Guest
|
Posted: Thu Aug 25, 2005 7:14 pm Post subject: const_iterator fails with a typedef to deque |
|
|
I'm getting a very weird compiler error with the following sample code
in BCB6:
#include <deque>
typedef std::deque<int> IntList;
void f(IntList::const_iterator it)
{
}
This code should be correct. The error puts me into _deque.h, which is
part of the STL implementation. The error claims a ')' is missing inside
STL, which is not true.
The following compiles fine:
void f()
{
IntList::const_iterator it;
}
and this one too:
void f(deque<int>::const_iterator it)
{
}
It looks like a compiler bug. And here's the workaround:
#include <deque>
typedef std::deque<int> IntList;
namespace BorlandCppWorkaround
{ typedef IntList::const_iterator IntList_const_iterator; }
void f(IntList::const_iterator it)
{
}
I thought it was very odd. What do you think?
Tom
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|