Skip to main content
C++ wrapper 0.24.0, core 0.24.0, C++11 or newer. Include aic.hpp and link the matching wrapper/native libraries. Start with the C++ integration guide. All names below are in namespace aic. Check Result and error handling before extracting a factory result. Ordinary C++ allocation or string operations can still throw; SDK status failures use the declared return values.

aic::Result<T>

Result<T> stores an ordinary value and a status. It does not throw on SDK errors, check access or automatically unwrap. take() moves the stored value regardless of the error code. Always call ok() or inspect error before extraction.

aic::Result<T>::Result-copy

Copies v and stores e. This overload requires T to be copyable when instantiated; it cannot copy an SDK-owned move-only handle. It performs no validation.

aic::Result<T>::Result-move

Moves v into the result and stores e. Use it for move-only handles. It performs no validation. There is no default constructor.

aic::Result<T>::ok

Returns error == ErrorCode::Success without inspecting the stored object.

aic::Result<T>::take

Returns std::move(value) without checking error and without resetting it. Extract a successful owned handle once. After extraction, the original handle value is moved-from; it can be destroyed or assigned, but must not be used to process or query audio state.

Checked extraction

This complete credential-free program checks the model-loading result before extracting the model and printing the linked core version. A missing file prints the error code and exits with status 1. Link it as described in the C++ guide.

Getter assertions

Model metadata getters and context value/decision/delay getters return scalar values and assert the underlying C call succeeded. They are not checked Result APIs. In assertion-disabled builds, a failure returns the wrapper’s initialized fallback (zero or false). Use valid objects and enum members; do not treat fallback values as error reporting. Model::get_id() separately returns an empty string for a null native handle.

aic::ErrorCode

enum class ErrorCode : int maps directly to the C status values. The following list is complete for wrapper 0.24.0. C++ API index · Troubleshooting · Authentication