cpp/experimental/memory resource/allocate

Allocates storage with a size of at least bytes. The returned storage is aligned to the specified if such alignment is supported, and to  otherwise.

Equivalent to.

Exceptions
Throws an exception if storage of the requested size and alignment cannot be obtained.