I'm reading mongo resource code, reading using ::std::mutex, but I don't know what's the meaning?
namespace stdx {
using ::std::mutex; // NOLINT
using ::std::timed_mutex; // NOLINT
using ::std::recursive_mutex; // NOLINT
using ::std::adopt_lock_t; // NOLINT
using ::std::defer_lock_t; // NOLINT
using ::std::try_to_lock_t; // NOLINT
using ::std::lock_guard; // NOLINT
using ::std::unique_lock; // NOLINT
}
Leading :: means compiler should start looking for definition of instantiated object from global scope.
Hence using ::std::mutex means starting from global scope, go to std namespace and use mutex class in current namespace stdx.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With