Answer
A namespace alias creates a shorter name for a long or nested namespace, improving readability without a broad using-directive. It's commonly used for deeply nested namespaces or to switch implementations by aliasing one namespace to a chosen name.
namespace fs = std::filesystem;
fs::path p = "/tmp";Real-world example Aliasing std::filesystem to fs keeps code concise while remaining explicit.