This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/72820] New: std::function can't store types with overloaded operator new
- 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: Fri, 05 Aug 2016 16:14:27 +0000
- Subject: [Bug libstdc++/72820] New: std::function can't store types with overloaded operator new
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72820
Bug ID: 72820
Summary: std::function can't store types with overloaded
operator new
Product: gcc
Version: 6.1.1
Status: UNCONFIRMED
Keywords: rejects-valid
Severity: normal
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: redi at gcc dot gnu.org
Target Milestone: ---
#include <functional>
struct foo {
void operator()() { }
static void* operator new(std::size_t, void* p);
};
int main()
{
std::function<void()> f = foo{};
}
The placement new-expressions in std::function need to use ::new