Generally, using namespace in global scope is considered as a bad practice. However, according to cppreference, the identifiers not starting with underscore(_) are reserved for standard library in the case of user-defined literals.
the identifier to use as the ud-suffix for the user-defined literals that will call this function. Must begin with the underscore _: the suffixes that do not begin with the underscore are reserved for the literal operators provided by the standard library.
Does that mean I can safely do using namespace std::literals; in global scope?
using namespacefor anything. I always pick-and-choose the specific identifiers I'm using, right after all my#includedirectives.using std::literals::string_literals::operator""susing namespacein global scope is considered as a bad practice" - not exactly. What is bad practice isusing namespace stdspecifically, notusing namespacein general.namespace std, the reason why it is bad also applies any other namespaces; the purpose of namespace is to prevent name collision, andusing namespacebreaks it. (The accepted answer of the linked question explains this.) The point of my question is whetherusing namespace std::literalsalso makes name collision or not.