[RFA 1/8] Add gdb_ref_ptr.h

Tom Tromey tom@tromey.com
Tue Dec 13 13:13:00 GMT 2016

>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:

Pedro> BTW, I noticed today that the GCC standards say:
Pedro>  "Template parameter names should use CamelCase, following the C++
Pedro>   Standard."
Pedro> and they do seem to follow it.  I think it's a good idea.
Pedro> Would you mind adjusting accordingly?

No problem, I did that.
FWIW my personal style is also to use CamelCase for macro arguments.

Pedro> I also noticed the "self/other" naming in the global operators:
Pedro> +template<typename T, typename POLICY>
Pedro> +inline bool operator== (const ref_ptr<T, POLICY> &self,
Pedro> +			const ref_ptr<T, POLICY> &other)
Pedro> +{
Pedro> I'd find it pedantically more correct to write lhs/rhs, since
Pedro> there's no actual this/self here.  Could you tweak that too?

I did this too.


More information about the Gdb-patches mailing list