WG14 result
Loading...
Searching...
No Matches
status_code_domain_vtable_s Struct Reference

The functions defined by a status code domain, kept ABI compatible with a C++ vtable. More...

#include <status_code_domain.h>

Public Attributes

int(*const name )(__attribute__((unused)) const void *_wg14_result_vtable_api_unique_name_temporary__COUNTER__, struct status_code_domain_vtable_name_args *args)
 Name of this category. Returns an errno if it failed.
 
void(*const payload_info )(__attribute__((unused)) const void *_wg14_result_vtable_api_unique_name_temporary__COUNTER__, struct status_code_domain_vtable_payload_info_args *args)
 Information about this domain's payload.
 
bool(*const failure )(__attribute__((unused)) const void *_wg14_result_vtable_api_unique_name_temporary__COUNTER__, const status_code_untyped *code)
 True if code means failure.
 
bool(*const equivalent )(__attribute__((unused)) const void *_wg14_result_vtable_api_unique_name_temporary__COUNTER__, const status_code_untyped *code1, const status_code_untyped *code2)
 
void(*const generic_code )(__attribute__((unused)) const void *_wg14_result_vtable_api_unique_name_temporary__COUNTER__, struct status_code_domain_vtable_generic_code_args *args)
 Returns the generic code closest to this code, if any.
 
int(*const message )(__attribute__((unused)) const void *_wg14_result_vtable_api_unique_name_temporary__COUNTER__, struct status_code_domain_vtable_message_args *args)
 
void(*const reserved_slot_for_cxx_throw_exception )(__attribute__((unused)) const void *_wg14_result_vtable_api_unique_name_temporary__COUNTER__, const status_code_untyped *code)
 
int(*const erased_copy )(__attribute__((unused)) const void *_wg14_result_vtable_api_unique_name_temporary__COUNTER__, status_code_untyped *dst, const status_code_untyped *src, status_code_domain_payload_info_t dstinfo)
 
void(*const erased_destroy )(__attribute__((unused)) const void *_wg14_result_vtable_api_unique_name_temporary__COUNTER__, status_code_untyped *code, status_code_domain_payload_info_t info)
 

Detailed Description

The functions defined by a status code domain, kept ABI compatible with a C++ vtable.

Definition at line 475 of file status_code_domain.h.

Member Data Documentation

◆ equivalent

bool(*const status_code_domain_vtable_s::equivalent) (__attribute__((unused)) const void *_wg14_result_vtable_api_unique_name_temporary__COUNTER__, const status_code_untyped *code1, const status_code_untyped *code2)

True if code is (potentially non-transitively) equivalent to another code in another domain.

Definition at line 493 of file status_code_domain.h.

◆ erased_copy

int(*const status_code_domain_vtable_s::erased_copy) (__attribute__((unused)) const void *_wg14_result_vtable_api_unique_name_temporary__COUNTER__, status_code_untyped *dst, const status_code_untyped *src, status_code_domain_payload_info_t dstinfo)

For a status_code<erased<T>> only, copy from src to dst. Default implementation uses memcpy(). Returns an errno if it failed. You should return an error code here if your payload is not trivially copyable or would not fit.

Definition at line 518 of file status_code_domain.h.

◆ erased_destroy

void(*const status_code_domain_vtable_s::erased_destroy) (__attribute__((unused)) const void *_wg14_result_vtable_api_unique_name_temporary__COUNTER__, status_code_untyped *code, status_code_domain_payload_info_t info)

For a status_code<erased<T>> only, destroy the erased value type. Default implementation does nothing.

Definition at line 524 of file status_code_domain.h.

◆ failure

bool(*const status_code_domain_vtable_s::failure) (__attribute__((unused)) const void *_wg14_result_vtable_api_unique_name_temporary__COUNTER__, const status_code_untyped *code)

True if code means failure.

Definition at line 488 of file status_code_domain.h.

◆ generic_code

void(*const status_code_domain_vtable_s::generic_code) (__attribute__((unused)) const void *_wg14_result_vtable_api_unique_name_temporary__COUNTER__, struct status_code_domain_vtable_generic_code_args *args)

Returns the generic code closest to this code, if any.

Definition at line 499 of file status_code_domain.h.

◆ message

int(*const status_code_domain_vtable_s::message) (__attribute__((unused)) const void *_wg14_result_vtable_api_unique_name_temporary__COUNTER__, struct status_code_domain_vtable_message_args *args)

Return a reference to a string textually representing a code. Returns an errno if it failed.

Definition at line 505 of file status_code_domain.h.

◆ name

int(*const status_code_domain_vtable_s::name) (__attribute__((unused)) const void *_wg14_result_vtable_api_unique_name_temporary__COUNTER__, struct status_code_domain_vtable_name_args *args)

Name of this category. Returns an errno if it failed.

Definition at line 478 of file status_code_domain.h.

◆ payload_info

void(*const status_code_domain_vtable_s::payload_info) (__attribute__((unused)) const void *_wg14_result_vtable_api_unique_name_temporary__COUNTER__, struct status_code_domain_vtable_payload_info_args *args)

Information about this domain's payload.

Definition at line 483 of file status_code_domain.h.

◆ reserved_slot_for_cxx_throw_exception

void(*const status_code_domain_vtable_s::reserved_slot_for_cxx_throw_exception) (__attribute__((unused)) const void *_wg14_result_vtable_api_unique_name_temporary__COUNTER__, const status_code_untyped *code)

ABI compatibility slot for throwing a code as a C++ exception, do not call this even from C++ (use the C++ implementation instead).

Definition at line 511 of file status_code_domain.h.


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