https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115420

--- Comment #7 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jonathan Wakely <r...@gcc.gnu.org>:

https://gcc.gnu.org/g:cc38bdf093c44918edff819ae6c73d03c726b341

commit r15-1256-gcc38bdf093c44918edff819ae6c73d03c726b341
Author: Jonathan Wakely <jwak...@redhat.com>
Date:   Tue Jun 11 11:08:12 2024 +0100

    libstdc++: Improve diagnostics for invalid std::hash specializations
[PR115420]

    When using a key type without a valid std::hash specialization the
    unordered containers give confusing diagnostics about the default
    constructor being deleted. Add a static_assert that will fail for
    disabled std::hash specializations (and for a subset of custom hash
    functions).

    libstdc++-v3/ChangeLog:

            PR libstdc++/115420
            * include/bits/hashtable.h (_Hashtable): Add static_assert to
            check that hash function is copy constructible.
            * testsuite/23_containers/unordered_map/115420.cc: New test.

Reply via email to