| Home | Libraries | People | FAQ | More

## Function set_default_resource

boost::container::pmr::set_default_resource

## Synopsis

    // In header: <boost/container/pmr/global_resource.hpp>

    memory_resource * set_default_resource(memory_resource * r);

## Description

Effects: If r is non-null, sets the value of the default memory resource pointer to r, otherwise sets the default memory resource pointer to new_delete_resource().

Postconditions: get_default_resource() == r.

Returns: The previous value of the default memory resource pointer.

Remarks: Calling the set_default_resource and get_default_resource functions shall not incur a data race. A call to the set_default_resource function shall synchronize with subsequent calls to the set_default_resource and get_default_resource functions.