p1005r0
namespace std { namespace fs = filesystem; }

Published Proposal,

This version:
http://wg21.link/P1005r0
Authors:
(NVIDIA)
(Los Alamos National Laboratory)
Audience:
LEWG, LWG, SG3
Project:
ISO JTC1/SC22/WG21: Programming Language C++

The filesystem library lives in std::filesystem. This makes usage excessively 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 boost::filesystem; or namespace fs = std::filesystem;.

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

1. Proposed Wording

The proposed changes are relative to ISO/IEC JTC1/SC22/WG21 [N4727], the working draft of the C++ International Standard as of the 2018-02 mailing.

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

namespace std { namespace fs = filesystem; }

References

Informative References

[N4727]
Richard Smith. Working Draft, Standard for Programming Language C++. URL: https://wg21.link/n4727