Difference in using namespace (std:: vs ::std::) [duplicate]

In your case, there is most likely no difference. However, generally, the difference is as follows:

using A::foo; resolves A from the current scope, while using ::A::foo searches for A from the root namespace. For example:

namespace A
{
    namespace B
    {
         class C;
    }
}
namespace B
{ 
    class C;
}
namespace A
{
    using B::C; // resolves to A::B::C
    using ::B::C; // resolves to B::C
    // (note that one of those using declarations has to be
    // commented for making this valid code!)
}

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)