Epok Engine

EPOK RUNTIME

epok::instrument::allocation::same_group

Function · 1 overload

Function

Performs `same group` as part of the instrument allocator module.

Belongs to
epok::instrument::allocation
Header
instrument_allocator.hpp
Overloads
1

Declaration

Declaration
inline bool same_group(const Slot& a, const Slot& b)

Performs `same group` as part of the instrument allocator module.

ParameterTypeMeaning
aconst Slot &Value supplied for a. Keep referenced or pointed-to data valid for the complete call.
bconst Slot &Value supplied for b. Keep referenced or pointed-to data valid for the complete call.

Returns: bool. Check the value before continuing when it represents success, availability or a resource handle.

Example

C++ example
#include "instrument_allocator.hpp"

// Assume these named values have been initialized with valid data:
// const Slot & a
// const Slot & b

auto result = epok::instrument::allocation::same_group(a, b);

Why use it

The boolean result makes success, availability or state explicit without exceptions.

Trade-offs and warnings

Check the return value; `false` is part of normal control flow for many PSX resource operations. Pointer/reference arguments are borrowed unless the source contract says otherwise; keep them valid for the complete operation and never assume null is accepted.

Declared in runtime/instrument_allocator.hpp:17

Related members