This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
Well, length and capacity seem easy:You can look at the string contents easily in gdb, but it is not so easy to see the length, capacity, or refcount. In fact, I have not yet discovered the right way to get gdb 6 to display them at all.
(gdb) p str._M_rep()->_M_length $5 = 0 (gdb) p str._M_rep()->_M_capacity $6 = 0
(gdb) p str.size() $8 = 0 (gdb) p str.capacity() $9 = 0
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |