This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB 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: [PATCH v1.1 1/3] Introduce gdb::function_view


On 02/23/2017 03:11 PM, Yao Qi wrote:
> Pedro Alves <palves@redhat.com> writes:
> 
>> I think putting these new things in _some_ namespace is the
>> right thing to do.  gdb is just the no-brainer namespace name.
> 
> Yes, that right.
> 
>>
>> IMO, _all_ of GDB should be under "namespace gdb".  Then these utilities
>> would either be put in "namespace gdb" too, or in a "namespace gtl",
>> for "gdb template library" or something like that.  Or we could
>> put them under "gtl" already.
> 
> IMO, "gdb template library" or "gtl" is project name, but it doesn't fit
> well as a namespace name.  I like "gdb::utils" :).

"gdb::utils::function_view" is maybe a bit too long for code
that is going to end up used a lot, though.

"gdb::function_view" or "gtl::function_view" also has the "advantage"
that replacing "gdb" with "std" at some point does not require
reindenting the code.  (e.g., gdb::optional -> std::optional when
we get to C++17).  1/2 :-)

I think the easiest is to keep using "gdb" for now, and revisit
if/when we move everything under gdb.

Thanks,
Pedro Alves


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