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]

Re: RFC: fix std::unique_ptr pretty-printer


On 13 August 2012 14:31, Tom Tromey wrote:
>>>>>> "Jonathan" == Jonathan Wakely <jwakely.gcc@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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]