Any of the functions defined in the C++ standard library
can report a failure by throwing an exception of a type
described in its Throws: paragraph,
or of a type derived from a type named in the Throws: paragraph
that would be caught by a handler ([except.handle]) for the base type.
Functions from the C standard library shall not throw exceptions158
except when such a function calls a program-supplied function that throws an
exception.159
Functions defined in the
C++ standard library
that do not have a Throws: paragraph
but do have a potentially-throwing exception specification
may throw implementation-defined exceptions.160
In particular, they
can report a failure to allocate storage by throwing an exception of type
bad_alloc,
or a class derived from
bad_alloc ([bad.alloc]).