On 13 August 2012 14:31, Tom Tromey wrote: >>>>>> "Jonathan" == Jonathan Wakely <jwakely....@gmail.com> writes: > >>> $11 = std::unique_ptr containing (datum *) 0x6067d0 > > Jonathan> It's inconsistent with the other printers in that it prints > Jonathan> the stored type, unlike e.g. std::vector<int> which just says > Jonathan> "std::vector of length ..." but I think that's an improvement. > > Yeah... without this bit it was just printing > > $11 = std::unique_ptr containing 0x6067d0 > > Ordinarily, gdb will print the type here; but it doesn't when called > from Python. I thought the typical output was easier to read. > > Jonathan> Personally I'd prefer the element_type as part of the type, e.g. > Jonathan> "std::unique_ptr<datum> = 0x6067d0" but that would be even more > Jonathan> inconsistent! > > I can make that change if you'd prefer. > I don't know why, but I didn't even think of it.
I prefer it as unique_ptr<datum> but I'm probably not your typical user of the pretty printers, so if anyone else has an opinion please share it.