llvm/llvm-project

`std::filesystem::canonical("")` should throw

Open

#77.170 geöffnet am 6. Jan. 2024

Auf GitHub ansehen
 (7 Kommentare) (0 Reaktionen) (1 zugewiesene Person)C++ (10.782 Forks)batch import
filesystemgood first issuelibc++

Repository-Metriken

Stars
 (26.378 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 1T 2h) (1.000 gemergte PRs in 30 T)

Beschreibung

Per fs.op.canonical, !exists(p) is an error. However, calling canonical("") returns the current path instead of raising an exception.

Tested with Apple clang version 15.0.0 (clang-1500.1.0.2.5) and -std=c++17.

Contributor Guide