On Mon, Oct 13, 2008 at 1:58 PM, Roy Stogner <[EMAIL PROTECTED]> wrote: > > > On Mon, 13 Oct 2008, John Peterson wrote: > >> I checked out GCC's implementation of std::complex<T> and I see the >> class contains two T's rather than e.g. a length=2 array such as: "T >> array[2];". So in the (purely academic) case where someone had a >> vector<complex<char>> I would be a little worried about the struct >> padding in doing what we are trying to do, but with a float or double >> I feel pretty confident everything is fine... > > I think that there's no padding for either a struct of 2 chars or an > array of char... but there's nothing in the standard to prevent > compilers from adding padding to the former, I don't think.
Okay. For some reason I thought tiny structs like that might get padded out to a 4 or 8-byte boundary in memory. -- John ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Libmesh-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/libmesh-users
