Gromacs  2024.4
 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>

Inherits gmx::internal::IExceptionInfo.

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.
 

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