Gromacs  2022.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions
gmx::ExceptionInfo< Tag, T > Class Template Reference

#include <gromacs/utility/exceptions.h>

+ Inheritance diagram for gmx::ExceptionInfo< Tag, T >:
+ Collaboration diagram for gmx::ExceptionInfo< Tag, T >:

Description

template<class Tag, typename T>
class gmx::ExceptionInfo< Tag, T >

Stores additional context information for exceptions.

Template Parameters
TagTag type (typically, a forward-declared struct that is not defined anywhere) that makes all ExceptionInfo types unique, even if they have the same value type.
TType of value this object stores. Needs to be copy-constructible.

Example of declaring a new info type that stores an integer:

typedef ExceptionInfo<struct ExceptionInfoMyInfo_, int> ExceptionInfoMyInfo;

Public Types

typedef T value_type
 The type of value stored in this object.
 

Public Member Functions

 ExceptionInfo (const T &value)
 Creates an info object from given value.
 
const T & value () const
 Returns the stored value.
 
- Public Member Functions inherited from gmx::internal::IExceptionInfo
 IExceptionInfo (const IExceptionInfo &)=default
 
 IExceptionInfo (IExceptionInfo &&) noexcept=default
 
IExceptionInfooperator= (const IExceptionInfo &)=default
 
IExceptionInfooperator= (IExceptionInfo &&) noexcept=default
 

The documentation for this class was generated from the following file: