On Thu, Feb 07, 2008 at 03:18:19PM -0500, Daniel Jacobowitz wrote: > On Thu, Feb 07, 2008 at 12:08:33PM -0800, Joe Buck wrote: > > It doesn't need to know that. Any compiler that follows the ABI, whether > > gcc, > > icc, or SGI's compiler, will produce the same data members on a GNU/Linux > > or BSD platform. It's a portable specification. > > I don't believe that the multi-vendor C++ ABI covers the STL. Only > things specifically trying to be compatible with GCC will have the > same members.
If they use the libstdc++ headers with a standard-conforming compiler, they will get the same members. On platforms where GCC is the default compiler, others will try to be compatible and it would be safe for gcc to make this kind of assumption. On other platforms it would not be safe.