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.
Tilbakemeldinger
https://aka.ms/ContentUserFeedback.
Kommer snart: Gjennom 2024 faser vi ut GitHub Issues som tilbakemeldingsmekanisme for innhold, og erstatter det med et nytt system for tilbakemeldinger. Hvis du vil ha mer informasjon, kan du se:Send inn og vis tilbakemelding for