Title
When are static-duration memory_resource objects destroyed?
Status
new
Section
[mem.res.global][syserr.errcat.objects]
Submitter
Jiang An

Created on 2021-11-07.00:00:00 last changed 2 weeks ago

Messages

Date: 2021-11-07.00:00:00

Both std::pmr::new_delete_resource and std::pmr::null_memory_resource return pointers to static-duration objects. It seems unspecified when the pointed-to objects are destroyed, so users can't reliably use these objects during destructions of their static-duration objects.

std::generic_category and std::system_category have the same issue, except that the referred-to objects may have different storage duration.

Should we specify in which case can these objects be used in the termination of a program?

History
Date User Action Args
2021-11-07 00:00:00admincreate