µOS++ IIIe Reference  v6.3.15
“Perfekt ist nicht gut genug”
The third edition of µOS++, a POSIX inspired open source system, written in C++.

Standard std namespace. More...

Classes

struct  hash< os::estd::thread::id >
 

Functions

new_handler get_new_handler () noexcept
 Get the current handler. More...
 
new_handler set_new_handler (new_handler handler) noexcept
 Establishes the function designated by handler as the current new_handler. More...
 

Variables

const nothrow_t nothrow
 

Detailed Description

Standard std namespace.

When building µOS++ applications for embedded targets, in addition to the os::estd namespace, the standard thread classes are also defined in the std namespace, so that applications explicitly using the std:: prefix need minimal changes to build.

The only non-standard feature is the need to prefix the included headers with cmsis-plus/std/, for example <cmsis-plus/std/thread>.

Function Documentation

◆ get_new_handler()

new_handler std::get_new_handler ( )
noexcept

Get the current handler.

Parameters
None.
Returns
Pointer to user function, or nullptr if not set.

The initial new_handler is a null pointer.

Definition at line 113 of file new.cpp.

◆ set_new_handler()

new_handler std::set_new_handler ( new_handler  handler)
noexcept

Establishes the function designated by handler as the current new_handler.

Parameters
handlerPointer to user function.
Returns
The previous handler.

This handler is invoked when the standard operator new() detect an out of memory condition, to give a chance to the application process it properly. If the application can arrange for more memory to be used for allocation, this function should return and the allocation process is retried. If not, this function should gracefully shut down and restart.

The initial new_handler is a null pointer.

Definition at line 91 of file new.cpp.

Variable Documentation

◆ nothrow

const nothrow_t std::nothrow
Initial value:
= nothrow_t
{ }

Definition at line 71 of file new.cpp.