http://gcc.gnu.org/bugzilla/show_bug.cgi?id=61105
Bug ID: 61105 Summary: [constexpr] accepts-invalid with new-expression in constant expression Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: richard-gccbugzilla at metafoo dot co.uk G++ accepts this ill-formed code: using size_t = decltype(sizeof(0)); constexpr void *operator new(size_t, int*) noexcept { return nullptr; } constexpr int *p = new (nullptr) int; This is invalid because a constant expression cannot contain an (evaluated) new-expression.