Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Convert nullable Embind types to use std::optional #51

Open
coderabbitai bot opened this issue Jan 7, 2025 · 0 comments
Open

refactor: Convert nullable Embind types to use std::optional #51

coderabbitai bot opened this issue Jan 7, 2025 · 0 comments
Assignees

Comments

@coderabbitai
Copy link

coderabbitai bot commented Jan 7, 2025

Background

Currently, we register nullable types in Embind using custom type definitions that map to 'T | null' in TypeScript. For example:

  • FilteredLogEventMapTsType -> number[] | null
  • LogEventIdxTsType -> number | null

Embind now provides built-in support for std::optional<T> through the register_optional() function, as documented here.

Proposed Changes

Convert all nullable type registrations to use std::optional<T> with register_optional().

References

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant