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

--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Jonathan Wakely
<r...@gcc.gnu.org>:

https://gcc.gnu.org/g:3bf56cdf5ec5e07ea34e6be0110ab8fc76641d87

commit r11-9153-g3bf56cdf5ec5e07ea34e6be0110ab8fc76641d87
Author: Jonathan Wakely <jwak...@redhat.com>
Date:   Thu Jul 22 18:49:57 2021 +0100

    libstdc++: Fix non-default constructors for hash containers [PR101583]

    When I added the new mixin to _Hashtable, I forgot to explicitly
    construct it in each non-default constructor. That means you can't
    use any constructors unless all three of the hash function, equality
    function, and allocator are all default constructible.

    libstdc++-v3/ChangeLog:

            PR libstdc++/101583
            * include/bits/hashtable.h (_Hashtable): Replace mixin with
            _Enable_default_ctor. Construct it explicitly in all
            non-forwarding, non-defaulted constructors.
            * testsuite/23_containers/unordered_map/cons/default.cc: Check
            non-default constructors can be used.
            * testsuite/23_containers/unordered_set/cons/default.cc:
            Likewise.

    (cherry picked from commit 8ed6cfbbee74ec9e03f2558b9c36f61dd7d4dcfd)

Reply via email to