[PATCH v5] libstdc++: Hashing support for chrono value classes [PR110357]

Giuseppe D'Angelo giuseppe.dangelo@kdab.com
Wed Nov 26 19:53:15 GMT 2025


Hi all,

First and foremost thank you so much for carrying this forward!

Il 26/11/25 10:22, Jonathan Wakely ha scritto:
> The C++26 draft is quite explicit:
> 
> "The specialization hash<chrono::duration<Rep, Period>> is enabled
> (22.10.19) if and only if hash<Rep> is enabled."
> 
> So hash<duration<R, P>> should not use hash<remove_cv_t<R>>, and
> therefore hash<duration<const int>> should be disabled.

I think this was an oversight on my part when I wrote the paper: I 
hadn't considered the possibility of cv-qualified representations for 
the duration. Of course LWG4481 makes the problem go away.

Thanks,

-- 
Giuseppe D'Angelo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4850 bytes
Desc: Firma crittografica S/MIME
URL: <https://gcc.gnu.org/pipermail/libstdc++/attachments/20251126/05a615eb/attachment.p7s>


More information about the Libstdc++ mailing list