So does that mean that hk_mp5kpdw's posted code has a fix? If so, then the OP can download SP6 and all will be well.
BTW, you wouldn't happen to have a link to a KB on that issue or something, would you?
So does that mean that hk_mp5kpdw's posted code has a fix? If so, then the OP can download SP6 and all will be well.
BTW, you wouldn't happen to have a link to a KB on that issue or something, would you?
I think hk_mp5kpdw's posted code is right out of the VC6.0 vector header (looks like my SP6 header).
The problem is that there's no conversion between vector::reverse_iterator to vector::const_iterater. So the compiler tries to use the "vector(size_type, const Type&)" constructor. Which is why the op gets the compiler error "cannot convert parameter 1 from reverse_iterator<> to unsigned int".
Don't have any KB links.
gg
>> typedef const_iterator _It
I missed that line and was assuming _It was a templated type. I see where that code fails now.
Codeplug has the answer. VC++6 didn't support member templates (function templates as members of class templates), which is why the standard library cannot be conforming. The standard requires a templated constructor taking an arbitrary pair of iterators. Because of the lacking functionality, the STL that ships with VC++6 only provides one that takes a pair of vector's own forward iterators.
Installing a service pack won't help.
Installing the platform SDK won't help.
Installing an alternative STL implementation won't help.
The only thing that will help is getting rid of that aged fossil that is VC++6.
All the buzzt!
CornedBee
"There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
- Flon's Law
>> Installing an alternative STL implementation won't help.
You'll never have a fully conforming implementation with a fossil compiler, but STLport does its best. It had no problems constructing a vector from reverse iterators anyways
gg
Yeah, it might have an overload for that.
Now try list's iterators, iostream iterators, and some of Boost's special iterator adapters (Listed in decreasing likelihood that they bothered to add an overload.) Be sure to make the foreign iterator have a different value type, e.g. try to initialize a vector<int> from a list<short>.
All the buzzt!
CornedBee
"There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
- Flon's Law