You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Null pointers are uses as the default context (pointer to a builder). This was a frequent source of issues when building the circuit simulator because we'd to access, for example, the failed state of the composer and get a segfault. Is there any subtle logic around the use of the nullptr context when we're constructing circuit constants? I think it would be best to always initialize the context and git rid of any special nullptr logic that exists in favor of something more explicit, and something that does not conflict with the strategy I took for the simlator.
The text was updated successfully, but these errors were encountered:
std::optional probably makes sense here, most of the logic around nullptr IIRC is just there to see if it has been set, if not then the stdlib type is likely a constant
codygunton
changed the title
Nullptr context in standard librarynullptr context in standard library
Aug 17, 2023
Null pointers are uses as the default context (pointer to a builder). This was a frequent source of issues when building the circuit simulator because we'd to access, for example, the
failed
state of the composer and get a segfault. Is there any subtle logic around the use of the nullptr context when we're constructing circuit constants? I think it would be best to always initialize the context and git rid of any special nullptr logic that exists in favor of something more explicit, and something that does not conflict with the strategy I took for the simlator.The text was updated successfully, but these errors were encountered: