[cfe-dev] Interest in a -Wusing-namespace-in-headers?

Daniel James dnljms at gmail.com
Wed Mar 16 16:51:22 PDT 2011


On 16 March 2011 22:56, Douglas Gregor <dgregor at apple.com> wrote:
>
> IIRC, libstdc++ does it with "strong using" directives (which Clang doesn't support).

Sorry, I meant libc++. It certainly uses using directives.

> Boost, I assume, only does this for using declarations; that's not what the patch is about.

No, because we don't know if the function is in the std namespace, so
we can't use a using declaration. They're used for other reasons as
well.

But it doesn't really matter where it is or isn't used. What matters
is that a properly scoped import is usually safe, and warning about
one would be counter productive.

Daniel



More information about the cfe-dev mailing list