This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] PR libstdc++/70966 fix lifetime bug for default resource


Similar to what I did for the new_delete_resource and
null_memory_resource objects, this makes the atomic<memory_resource*>
immortal. This ensure it can still be used after static destructors
start running.

	PR libstdc++/70966
	* include/experimental/memory_resource (__get_default_resource): Use
	placement new to create an object with dynamic storage duration.

Tested powerpc64le-linux, committed to trunk.


Attachment: patch.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]