ThreadReferencedError Class Reference

#include <apibase.h>

Detailed Description

ThreadReferencedError holds a pointer to an Error object which is referenced by the current thread (or referenced globally such that its lifetime is sufficiently long). It is used at some places of the API when an Error shall be passed in return values of functions: If Error was used instead, this would introduce overhead because of its reference counting and because it can't be passed in registers.

Note
Do not add a constructor to this class and do not use default member initialization! This would break binary compatiblity and prevent register usage (on Windows).
See also
System::SetCurrentError

Public Member Functions

 __attribute__ ((always_inline)) void operator
 

Static Public Member Functions

static ThreadReferencedError CreateFromReferencedError (const Error *referencedError)
 

Friends

template<typename >
class ResultBase
 
template<typename >
class Result
 

Member Function Documentation

◆ CreateFromReferencedError()

static ThreadReferencedError CreateFromReferencedError ( const Error *  referencedError)
static

Constructs a ThreadReferencedError from an error object which is referenced by the current thread (or referenced globally such that its lifetime is sufficiently long).

Parameters
[in]referencedErrorPointer to an error object, must not be nullptr or a pointer to a null reference.
Returns
ThreadReferencedError holding the pointer.

◆ __attribute__()

__attribute__ ( (always_inline)  )

Friends And Related Function Documentation

◆ ResultBase

friend class ResultBase
friend

◆ Result

friend class Result
friend