This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/82262] std::hash<std::optional<T>>::operator() missing remove_const_t
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 20 Sep 2017 14:23:01 +0000
- Subject: [Bug libstdc++/82262] std::hash<std::optional<T>>::operator() missing remove_const_t
- Auto-submitted: auto-generated
- References: <bug-82262-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82262
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Author: redi
Date: Wed Sep 20 14:22:29 2017
New Revision: 253015
URL: https://gcc.gnu.org/viewcvs?rev=253015&root=gcc&view=rev
Log:
PR libstdc++/82262 fix std::hash<std::optional<const T>>
PR libstdc++/82262
* include/std/optional (__optional_hash_call_base): Add template
parameter for remove_const_t<_Tp> and use it consistently.
* testsuite/20_util/optional/hash.cc: Test optional<const T>.
Modified:
branches/gcc-7-branch/libstdc++-v3/ChangeLog
branches/gcc-7-branch/libstdc++-v3/include/std/optional
branches/gcc-7-branch/libstdc++-v3/testsuite/20_util/optional/hash.cc