https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96537
Tom de Vries <vries at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Known to work| |7.5.0 Target Milestone|--- |7.5 Resolution|--- |FIXED Status|UNCONFIRMED |RESOLVED Known to fail| |4.8.5 --- Comment #1 from Tom de Vries <vries at gcc dot gnu.org> --- Can be worked around by using: ... m.emplace (1, std::unique_ptr<A> (new A(1))); ... This PR is probably a duplicate, but I'm not sure which one. Anyway, this is fixed starting 7.5.0, so closing it as resolved-fixed, perhaps someone can mark it a duplicate.