GNU g++  v5.2.1
GNU Standard C++
Exceptions

Namespaces

 std::__exception_ptr
 

Classes

class  std::__exception_ptr::exception_ptr
 An opaque pointer to an arbitrary exception. More...
 

Functions

namespace std _GLIBCXX_VISIBILITY (default)
 
template<typename _Ex >
exception_ptr std::copy_exception (_Ex __ex) _GLIBCXX_USE_NOEXCEPT _GLIBCXX_DEPRECATED
 Obtain an exception_ptr pointing to a copy of the supplied object. More...
 
exception_ptr std::current_exception () _GLIBCXX_USE_NOEXCEPT
 Obtain an exception_ptr to the currently handled exception. More...
 
template<typename _Ex >
exception_ptr std::make_exception_ptr (_Ex __ex) _GLIBCXX_USE_NOEXCEPT
 Obtain an exception_ptr pointing to a copy of the supplied object. More...
 
void std::rethrow_exception (exception_ptr) __attribute__((__noreturn__))
 Throw the object pointed to by the exception_ptr. More...
 

Detailed Description

Function Documentation

namespace std _GLIBCXX_VISIBILITY ( default  )

The base of the I/O class hierarchy.

This class defines everything that can be defined about I/O that does not depend on the type of characters being input or output. Most people will only see ios_base when they need to specify the full name of the various I/O flags (e.g., the openmodes).

These are thrown to indicate problems with io.

27.4.2.1.1 Class ios_base::failure

This is a bitmask type.

_Ios_Fmtflags is implementation-defined, but it is valid to perform bitwise operations on these values and expect the Right Thing to happen. Defined objects of type fmtflags are:

  • boolalpha
  • dec
  • fixed
  • hex
  • internal
  • left
  • oct
  • right
  • scientific
  • showbase
  • showpoint
  • showpos
  • skipws
  • unitbuf
  • uppercase
  • adjustfield
  • basefield
  • floatfield

Insert/extract bool in alphabetic rather than numeric format.

Converts integer input or generates integer output in decimal base.

Generate floating-point output in fixed-point notation.

Converts integer input or generates integer output in hexadecimal base.

Adds fill characters at a designated internal point in certain generated output, or identical to right if no such point is designated.

Adds fill characters on the right (final positions) of certain generated output. (I.e., the thing you print is flush left.)

Converts integer input or generates integer output in octal base.

Adds fill characters on the left (initial positions) of certain generated output. (I.e., the thing you print is flush right.)

Generates floating-point output in scientific notation.

Generates a prefix indicating the numeric base of generated integer output.

Generates a decimal-point character unconditionally in generated floating-point output.

Generates a + sign in non-negative generated numeric output.

Skips leading white space before certain input operations.

Flushes output after each output operation.

Replaces certain lowercase letters with their uppercase equivalents in generated output.

A mask of left|right|internal. Useful for the 2-arg form of setf.

A mask of dec|oct|hex. Useful for the 2-arg form of setf.

A mask of scientific|fixed. Useful for the 2-arg form of setf.

This is a bitmask type.

_Ios_Iostate is implementation-defined, but it is valid to perform bitwise operations on these values and expect the Right Thing to happen. Defined objects of type iostate are:

  • badbit
  • eofbit
  • failbit
  • goodbit

Indicates a loss of integrity in an input or output sequence (such as an irrecoverable read error from a file).

Indicates that an input operation reached the end of an input sequence.

Indicates that an input operation failed to read the expected characters, or that an output operation failed to generate the desired characters.

Indicates all is well.

This is a bitmask type.

_Ios_Openmode is implementation-defined, but it is valid to perform bitwise operations on these values and expect the Right Thing to happen. Defined objects of type openmode are:

  • app
  • ate
  • binary
  • in
  • out
  • trunc

Seek to end before each write.

Open and seek to end immediately after opening.

Perform input and output in binary mode (as opposed to text mode). This is probably not what you think it is; see https://gcc.gnu.org/onlinedocs/libstdc++/manual/fstreams.html#std.io.filestreams.binary

Open for input. Default for ifstream and fstream.

Open for output. Default for ofstream and fstream.

Open for input. Default for ofstream.

This is an enumerated type.

_Ios_Seekdir is implementation-defined. Defined values of type seekdir are:

  • beg
  • cur, equivalent to SEEK_CUR in the C standard library.
  • end, equivalent to SEEK_END in the C standard library.

Request a seek relative to the beginning of the stream.

Request a seek relative to the current position within the sequence.

Request a seek relative to the current end of the sequence.

The set of events that may be passed to an event callback.

erase_event is used during ~ios() and copyfmt(). imbue_event is used during imbue(). copyfmt_event is used during copyfmt().

The type of an event callback function.

Parameters
__eOne of the members of the event enum.
__bReference to the ios_base object.
__iThe integer provided when the callback was registered.

Event callbacks are user defined functions that get called during several ios_base and basic_ios functions, specifically imbue(), copyfmt(), and ~ios().

Add the callback __fn with parameter __index.

Parameters
__fnThe function to add.
__indexThe integer to pass to the function when invoked.

Registers a function as an event callback with an integer parameter to be passed to the function when invoked. Multiple copies of the function are allowed. If there are multiple callbacks, they are invoked in the order they were registered.

Access to format flags.

Returns
The format control flags for both input and output.

Setting new format flags all at once.

Parameters
__fmtflThe new flags to set.
Returns
The previous format control flags.

This function overwrites all the format flags with __fmtfl.

Setting new format flags.

Parameters
__fmtflAdditional flags to set.
Returns
The previous format control flags.

This function sets additional flags in format control. Flags that were previously set remain set.

Setting new format flags.

Parameters
__fmtflAdditional flags to set.
__maskThe flags mask for fmtfl.
Returns
The previous format control flags.

This function clears mask in the format flags, then sets fmtfl & mask. An example mask is ios_base::adjustfield.

Clearing format flags.

Parameters
__maskThe flags to unset.

This function clears __mask in the format flags.

Flags access.

Returns
The precision to generate on certain output operations.

Be careful if you try to give a definition of precision here; see DR 189.

Changing flags.

Parameters
__precThe new precision value.
Returns
The previous value of precision().

Flags access.

Returns
The minimum field width to generate on output operations.

Minimum field width refers to the number of characters.

Changing flags.

Parameters
__wideThe new width value.
Returns
The previous value of width().

Interaction with the standard C I/O objects.

Parameters
__syncWhether to synchronize or not.
Returns
True if the standard streams were previously synchronized.

The synchronization referred to is only that between the standard C facilities (e.g., stdout) and the standard C++ objects (e.g., cout). User-declared streams are unaffected. See https://gcc.gnu.org/onlinedocs/libstdc++/manual/fstreams.html#std.io.filestreams.binary

Setting a new locale.

Parameters
__locThe new locale.
Returns
The previous locale.

Sets the new locale for this stream, and then invokes each callback with imbue_event.

Locale access

Returns
A copy of the current locale.

If imbue(loc) has previously been called, then this function returns loc. Otherwise, it returns a copy of std::locale(), the global C++ locale.

Locale access

Returns
A reference to the current locale.

Like getloc above, but returns a reference instead of generating a copy.

Access to unique indices.

Returns
An integer different from all previous calls.

This function returns a unique integer every time it is called. It can be used for any purpose, but is primarily intended to be a unique index for the iword and pword functions. The expectation is that an application calls xalloc in order to obtain an index in the iword and pword arrays that can be used without fear of conflict.

The implementation maintains a static variable that is incremented and returned on each invocation. xalloc is guaranteed to return an index that is safe to use in the iword and pword arrays.

Access to integer array.

Parameters
__ixIndex into the array.
Returns
A reference to an integer associated with the index.

The iword function provides access to an array of integers that can be used for any purpose. The array grows as required to hold the supplied index. All integers in the array are initialized to 0.

The implementation reserves several indices. You should use xalloc to obtain an index that is safe to use. Also note that since the array can grow dynamically, it is not safe to hold onto the reference.

Access to void pointer array.

Parameters
__ixIndex into the array.
Returns
A reference to a void* associated with the index.

The pword function provides access to an array of pointers that can be used for any purpose. The array grows as required to hold the supplied index. All pointers in the array are initialized to 0.

The implementation reserves several indices. You should use xalloc to obtain an index that is safe to use. Also note that since the array can grow dynamically, it is not safe to hold onto the reference.

Invokes each callback with erase_event. Destroys local storage.

Note that the ios_base object for the standard streams never gets destroyed. As a result, any callbacks registered with the standard streams will not get invoked with erase_event (unless copyfmt is used).

Calls base.setf(ios_base::boolalpha).

Calls base.unsetf(ios_base::boolalpha).

Calls base.setf(ios_base::showbase).

Calls base.unsetf(ios_base::showbase).

Calls base.setf(ios_base::showpoint).

Calls base.unsetf(ios_base::showpoint).

Calls base.setf(ios_base::showpos).

Calls base.unsetf(ios_base::showpos).

Calls base.setf(ios_base::skipws).

Calls base.unsetf(ios_base::skipws).

Calls base.setf(ios_base::uppercase).

Calls base.unsetf(ios_base::uppercase).

Calls base.setf(ios_base::unitbuf).

Calls base.unsetf(ios_base::unitbuf).

Calls base.setf(ios_base::internal, ios_base::adjustfield).

Calls base.setf(ios_base::left, ios_base::adjustfield).

Calls base.setf(ios_base::right, ios_base::adjustfield).

Calls base.setf(ios_base::dec, ios_base::basefield).

Calls base.setf(ios_base::hex, ios_base::basefield).

Calls base.setf(ios_base::oct, ios_base::basefield).

Calls base.setf(ios_base::fixed, ios_base::floatfield).

Calls base.setf(ios_base::scientific, ios_base::floatfield).

Exception possibly thrown by shared_ptr.

Specialization using EBO.

Specialization not using EBO.

static_pointer_cast

const_pointer_cast

dynamic_pointer_cast

std::hash specialization for __shared_ptr.

Thown by exception safety machinery.

Base class for checking address and label information about allocations. Create a std::map between the allocated address (void*) and a datum for annotations, which are a pair of numbers corresponding to label and allocated size.

Base struct for condition policy.

Requires a public member function with the signature void throw_conditionally()

Base class for incremental control and throw.

Never enter the condition.

Always enter the condition.

Enter the nth condition.

Base class for random probability control and throw.

Group condition.

Never enter the condition.

Always enter the condition.

Class with exception generation control. Intended to be used as a value_type in templatized code.

Note: Destructor not allowed to throw.

Type throwing via limit condition.

Type throwing via random condition.

Allocator class with logging and exception generation control. Intended to be used as an allocator_type in templatized code.

Note: Deallocate not allowed to throw.

Allocator throwing via limit condition.

Allocator throwing via random condition.

Exception possibly thrown by shared_ptr.

References __gnu_debug::__base().

Here is the call graph for this function:

template<typename _Ex >
exception_ptr std::copy_exception ( _Ex  __ex)

Obtain an exception_ptr pointing to a copy of the supplied object.

This function is deprecated, use std::make_exception_ptr instead.

exception_ptr std::current_exception ( )

Obtain an exception_ptr to the currently handled exception.

If there is none, or the currently handled exception is foreign, return the null value.

Referenced by std::make_exception_ptr().

Here is the caller graph for this function:

template<typename _Ex >
exception_ptr std::make_exception_ptr ( _Ex  __ex)

Obtain an exception_ptr pointing to a copy of the supplied object.

References std::current_exception().

Here is the call graph for this function:

void std::rethrow_exception ( exception_ptr  )

Throw the object pointed to by the exception_ptr.