Skip to content

Commit 351afbf

Browse files
jensmaurertkoeppe
authored andcommitted
LWG3657 std::hash<std::filesystem::path> is not enabled
1 parent 2e371d9 commit 351afbf

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

source/iostreams.tex

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12668,6 +12668,12 @@
1266812668
path weakly_canonical(const path& p, error_code& ec);
1266912669
}
1267012670

12671+
// \ref{fs.path.hash}, hash support
12672+
namespace std {
12673+
template<class T> struct hash;
12674+
template<> struct hash<filesystem::path>;
12675+
}
12676+
1267112677
namespace std::ranges {
1267212678
template<>
1267312679
inline constexpr bool enable_borrowed_range<filesystem::directory_iterator> = true;
@@ -14618,6 +14624,19 @@
1461814624
Equivalent to: \tcode{return path(lhs) /= rhs;}
1461914625
\end{itemdescr}
1462014626

14627+
\rSec3[fs.path.hash]{Hash support}
14628+
14629+
\begin{itemdecl}
14630+
template<> struct hash<filesystem::path>;
14631+
\end{itemdecl}
14632+
14633+
\begin{itemdescr}
14634+
\pnum
14635+
For an object \tcode{p} of type \tcode{filesystem::path},
14636+
\tcode{hash<filesystem::path>()(p)} evaluates to the same result as
14637+
\tcode{filesystem::hash_value(p)}.
14638+
\end{itemdescr}
14639+
1462114640
\rSec2[fs.class.filesystem.error]{Class \tcode{filesystem_error}}
1462214641

1462314642
\rSec3[fs.class.filesystem.error.general]{General}

0 commit comments

Comments
 (0)