Topic: [N3916] Using memory resources in global constructors/destructors
Author: Andrey Semashev <andrey.semashev@gmail.com>
Date: Tue, 8 Sep 2015 18:15:01 +0300
Raw View
Hi,
In N3916, "Polymorphic Memory Resources, r2", it is said that
new_delete_resource() and null_memory_resource() return pointers to the
memory resource objects which have statis storage duration. Since these
objects derive from memory_resource and have virtual functions, these
objects are initialized at dynamic initialization stage and as such
cannot be used in global constructors and destructors. Is my
understanding correct?
If so, I think this is a serious limitation that severily hampers
usability of this mechanism. It is quite common to have global strings
and containers (directly or as part of user-defined types), which had
been safe before.
--
---
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.
.