google / google/autocxx

Non-POD structure constants

Open
#94 0 comments 0 reactions 0 assignees View on GitHub
cpp-feature
Dominant language
Rust
Stars
2.6k
Forks
175
PR merge metrics
No merged PRs in 30d

Description

A follow up from #93, much harder.

We need to figure out how to expose C++ constants which are types that cannot be represented in Rust by value.

We probably need to generate some C++ code which will return a `UniquePtr` to a copy of the constant. This assumes that the constant can be copied, and obviously has performance implications.

I'm adding an `#[ignore]`d test - `test_non_pod_constant`.

Contributor guide

Open the contributing guide

Research direction

Start with the ignored test `test_non_pod_constant` mentioned in the issue and review the context from #93. Trace how non-POD C++ constants are currently exposed and determine the required generated-code behavior. Done means the test is no longer ignored and non-POD constants can be exposed through the proposed `UniquePtr` approach.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, rust
Domain
devtools
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.