Issue with std::optional<Opaque*> #5253
Unanswered
CalaveraLoco
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I feel out of my depth with this issue. I can work around it but it got me curious what causes it.
I have an opaque type and a couple of functions that use it on the C++ side.
They seem work fine when I have:
do_something1(Opaque_t x)
do_something2(Opaque_t* x)
even if I use:
do_something3(std::optional<Opaque_t> x)
but when I get to this:
do_something4(std::optional<Opaque_t*> x)
The fields of (*x) (within do_something4) seems to be random numbers.
What am I missing to be able to use this last option or is it working as intended or a known limitation?
ps.:I tried to search for similar topics but nothing came up anyway sorry if this is end up as a duplicate.
Beta Was this translation helpful? Give feedback.
All reactions