template <class T, class Traits <strong class="highlight">=</strong> char_traits<T>, class Alloc <strong class="highlight">=</strong> allocator<T> > class basic_string { public: // Lots and lots of interface stuff private: size_type size; // Probably a 32-bit type size_type capacity; // Probably a 32-bit type _buf_type buffer; };struct _buf_type { T *base; // Beginning of buffer T *; // Helper pointer within buffer };
class basic_string {
public:
// Lots and lots of interface stuff
private:
size_type size; // Probably a 32-bit type
size_type capacity; // Probably a 32-bit type
_buf_type buffer;
};struct _buf_type {
T *base; // Beginning of buffer
T *; // Helper pointer within buffer
};
-->
(同时记得考虑内存对齐)得出16