This compiles using g++ for me.
namespace foo {
namespace bar {
class baz;
}
}
using foo::bar::baz;
class nsSVGUtils
{
public:
static baz GetFillRule(baz* aElement);
};
int main(void) {
return 0;
}
----- Original Message -----
> On 10/31/13 3:05 PM, Monica Chew wrote:
> > Can we agree on using the using directive instead of typedefs when it comes
> > to namespaces? I think it's less likely to lead to confusing compile
> > errors than typedefs.
> >
> > class nsSVGUtils
> > {
> > using mozilla::gfx::FillRule;
>
> I believe this is not valid C++, sadly. g++ gives me:
>
> error: using-declaration for non-member at class scope
>
> whereas clang++ gives me:
>
> error: using declaration in class refers into 'mozilla::gfx::', which
> is not a class
>
> Yes, that's pretty sucky. But as a result the typedef option is the
> only option available here. :(
>
> -Boris
> _______________________________________________
> dev-platform mailing list
> [email protected]
> https://lists.mozilla.org/listinfo/dev-platform
>
_______________________________________________
dev-platform mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-platform