Following our discussion here and in the weekly platform team call, I've
gone ahead and altered the C++ style guide to note that we now prefer
'static' to anonymous namespaces (except for cases that can't be covered
by 'static').
https://developer.mozilla.org/en-US/docs/Developer_Guide/Coding_Style#Anonymous_namespaces
cheers,
Jason
On 11/02/2012 10:03 PM, Robert O'Callahan wrote:
On Sat, Nov 3, 2012 at 8:59 AM, Jason Duell <jduell.mcb...@gmail.com
<mailto:jduell.mcb...@gmail.com>> wrote:
I see an increasing number of patches using anonymous namespaces
instead of 'static'. This is debugger unfriendly: setting a
breakpoint in gdb for 'foo' in an anonymous namespace requires the
following syntax:
b (anonymous namespace)::foo
Even worse, in Visual Studio 2010 (not sure about 2012), you can't set
a breakpoint on an anonymous-namespace symbol *at all*. And we can't
submit patches to fix that, either :-).
Rob
--
Jesus called them together and said, “You know that the rulers of the
Gentiles lord it over them, and their high officials exercise
authority over them. Not so with you. Instead, whoever wants to become
great among you must be your servant, and whoever wants to be first
must be your slave — just as the Son of Man did not come to be served,
but to serve, and to give his life as a ransom for many.” [Matthew
20:25-28]
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform