A complete object is declared reachable while the number of calls to
declare_reachable with an argument referencing the object exceeds the
number of calls to undeclare_reachable with an argument referencing the
object.
Preconditions: If p is not null, the complete object referenced by p
has been previously declared reachable, and is
live ([basic.life]) from the time of the call until the last
undeclare_reachable(p) call on the object.
It is expected that calls to declare_reachable(p) will consume
a small amount of memory in addition to that occupied by the referenced object until the
matching call to undeclare_reachable(p) is encountered.
Long running programs
should arrange that calls are matched.
In a garbage-collecting implementation, the fact that a region in an object is
registered with declare_no_pointers() should not prevent the object from
being collected.
Effects: The n bytes starting at p no longer contain
traceable pointer locations, independent of their type.
Hence
indirection through a pointer located there is undefined if the object
it points to was created by global operatornew and not
previously declared reachable.
It is
implementation-defined
whether
get_pointer_safety returns pointer_safety::relaxed or
pointer_safety::preferred if the implementation has relaxed pointer
safety.219