Types

Name

Description

always_true

A predicate that always returns true.

default_resource_t

error_code_checker

A predicate for checking whether an error code indicates error.

exception_checker

A predicate for checking whether an exception is being thrown.

fd_deleter

POSIX-like file descriptor deleter

fd_resource_traits

POSIX-like file descriptor resource traits

scope_exit

Scope exit guard that conditionally invokes a function upon leaving the scope.

scope_fail

Scope exit guard that invokes a function upon leaving the scope with a failure condition satisfied.

scope_final

Scope final guard that invokes a function upon leaving the scope.

scope_success

Scope exit guard that invokes a function upon leaving the scope with a failure condition not satisfied.

unique_fd

Unique POSIX-like file descriptor resource

unique_resource

RAII wrapper for automatically reclaiming arbitrary resources.

Functions

Name

Description

check_error_code

Creates a predicate for checking whether an exception is being thrown

check_exception

Creates a predicate for checking whether an exception is being thrown

make_scope_exit

Creates a scope guard with a given action function object.

make_scope_fail

Creates a scope fail guard with a given action function object.

make_scope_success

Creates a scope fail guard with a given action function object.

make_unique_resource_checked

Checks if the resource is valid and creates a unique_resource wrapper.

swap

Variables

Name

Description

default_resource

Keyword representing default, unallocated resource argument

Deduction Guides