This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] PR libstdc++/82262 fix std::hash<std::optional<const T>>


The std::hash specialization for std::optional was missing a
remove_const_t so tried to use a disabled hash specialization.

	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>.

Tested powerpc64le-linux, committing to trunk and gcc-7-branch.

Attachment: patch.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]