Skip to content

Latest commit

 

History

History
25 lines (18 loc) · 905 Bytes

nothrow-t-structure.md

File metadata and controls

25 lines (18 loc) · 905 Bytes
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Learn more about: nothrow_t Structure
nothrow_t Structure
11/04/2016
nothrow_t
nothrow_t class
dc7d5d42-ed5a-4919-88fe-bbad519b7a1d

nothrow_t Structure

The struct is used as a function parameter to operator new to indicate that the function should return a null pointer to report an allocation failure, rather than throw an exception.

Syntax

struct std::nothrow_t {};

Remarks

The struct helps the compiler to select the correct version of the constructor. nothrow is a synonym for objects of type std::nothrow_t.

Example

See operator new and operator new[] for examples of how std::nothrow_t is used as a function parameter.