On Saturday, November 3, 2012 2:20:59 PM UTC-7, Justin Lebar wrote:
> > Since you can't refer to anonymous-namespace symbols at all in the Visual
> > Studio debugger...
>
> Are there compiler annotations we could put on a class so that it
> behaves as though it's in an anonymous namespace but also plays nicely
> with the debugger? If so, maybe we should switch to those.
I don't know why this didn't occur to me before, but why don't we just use
"unique-ish" non-anonymous namespaces for hiding classes. One possibility is
to just use the name of the file, a la #ifndef FOO_H:
namespace TabParent_cpp { ... }
Or we could use something like "Anon235".
Yes, this could result in the same namespace being used by different files with
the same name in different directories. But it's not a problem until/unless
there are actual symbol conflicts at link time. And then a fix is trivial
(change one of the namespace names) w/o any serious hg annotate bustage.
(Personally I still dislike namespaces, and am happy every time I'm debugging a
file that doesn't use them, so I can actually doubleclick nsFoo::Bar(...) and
middle mouse paste it into gdb, without having to type out mozilla::whatever::
as well. Developer time wasted!)
Jason
_______________________________________________
dev-platform mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-platform