
On 7/27/06 6:50 PM, "loufoque" <mathias.gaunard@etu.u-bordeaux1.fr> wrote:
Dave Dribin wrote :
And this has a workaround by using a for loop.
Not really. std::vector, just like a lot of elements from the C++ standard library, require that the types are CopyConstructible. And if endian types are, they're not PODs anymore.
Why would being copy-constructible forbid POD-ness? Obviously, adding a copy constructor to a class/struct/union would disqualify it from being POD. But that's not the only way to define copying. The automatic copy constructor does _not_ cancel POD qualification, since is a dumb bitwise copy for PODs, and should still count as copy-constructible as far as STL is concerned. (If an explicit copy construction operation actually is required, then the concept is broken. It not like you can improperly use a constructor by getting its member-function address.) -- Daryle Walker Mac, Internet, and Video Game Junkie darylew AT hotmail DOT com