Re: Copy Constructor for an Array Element ???
> You need #include <new> at the top (or possibly <new.h> for[color=blue]
> pre-standard compilers). Then it should be accepted by any recent
> compiler, and certainly MSVC6+, GCC 2.95+, etc.[/color]
Okay Great, now two out of three compilers accept this, and
function correctly (invoking the object's copy constructor).
The problem is that I need it to work on ant AT&T 2.0, pre-template,
circa 1990 compiler. My whole purpose is to create std::vector for my
antique compiler.
I want to have a development machine that is reasonably functional
and will fit in my pocket. The second requirement eliminates all
notebook computers and laptops. The first requirement
(when combined with the second requirement) eliminates
most everything besides HP Jornada, 690, 720, and 728.
None of these machines are Intel compatible, thus by themselves will not
run any compiler. When you add PocketDOS, you can now run any
software that runs on an 8088, this includes Borland Turbo C++ 1.0.
It runs on the Jornada's from 2.5 to 7.5 times faster than an 8088.
The major shortcoming of this old compiler is that lack of std::vector,
so I wrote one. Now All I need to do is to find the best way to copy
construct array elements. Do you have any ideas besides <placement new> ?
> You need #include <new> at the top (or possibly <new.h> for[color=blue]
> pre-standard compilers). Then it should be accepted by any recent
> compiler, and certainly MSVC6+, GCC 2.95+, etc.[/color]
Okay Great, now two out of three compilers accept this, and
function correctly (invoking the object's copy constructor).
The problem is that I need it to work on ant AT&T 2.0, pre-template,
circa 1990 compiler. My whole purpose is to create std::vector for my
antique compiler.
I want to have a development machine that is reasonably functional
and will fit in my pocket. The second requirement eliminates all
notebook computers and laptops. The first requirement
(when combined with the second requirement) eliminates
most everything besides HP Jornada, 690, 720, and 728.
None of these machines are Intel compatible, thus by themselves will not
run any compiler. When you add PocketDOS, you can now run any
software that runs on an 8088, this includes Borland Turbo C++ 1.0.
It runs on the Jornada's from 2.5 to 7.5 times faster than an 8088.
The major shortcoming of this old compiler is that lack of std::vector,
so I wrote one. Now All I need to do is to find the best way to copy
construct array elements. Do you have any ideas besides <placement new> ?
Comment