P1005R1
namespace std { namespace fs = filesystem; }

Published Proposal,

This version:
https://wg21.link/P1005R1
Issue Tracking:
GitHub
Authors:
(NVIDIA)
(Los Alamos National Laboratory)
Audience:
LEWG, LWG, SG3
Project:
ISO/IEC JTC1/SC22/WG21 14882: Programming Language — C++
Source:
github.com/brycelelbach/wg21_p1005_fs_alias/blob/master/fs_alias.bs

The filesystem library lives in std::filesystem. This makes usage verbose and ergonomically challenging.

It is common practice for people to introduce the namespace alias namespace fs = std::filesystem; when using the filesystem library to make usage more concise.

cppreference.com’s examples for the filesystem library use either using namespace std::filesystem; or namespace fs = std::filesystem;.

Boost Filesystem’s tutorial and examples use namespace fs = boost::filesystem;.

Let’s standardize this.

Wording: Add the following to the header synopsis for <filesystem> in [fs.filesystem.syn]:

namespace std { namespace fs = filesystem; }