Help perfecting std::vector for antique C++ compilers

J

John Harrison

Peter Olcott said:
http://home.att.net/~olcott/std_vect.h

This is my current version of a std::vector class that was designed to work
on antique (pre-template) compilers. I would really appreciate a critique
so that I can perfect it much more quickly, thanks in advance.

Well I'd definitely get rid of the operator User_Type*, that can be called
implicitly in all sorts of unexpected situations.

If users want the address of the start of the array they can use the
explicit expression &a[0].

john
 
P

Peter Olcott

This is my current version of a std::vector class that was designed to
work
on antique (pre-template) compilers. I would really appreciate a critique
so that I can perfect it much more quickly, thanks in advance.

Well I'd definitely get rid of the operator User_Type*, that can be called
implicitly in all sorts of unexpected situations.

If users want the address of the start of the array they can use the
explicit expression &a[0].

john

I removed it and one of my compiler errors disappeared. This
class still does not quite work correctly. Can you help me find
the errors?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,161
Messages
2,570,892
Members
47,430
Latest member
7dog123

Latest Threads

Top