dwavesystems / dwavesystems/dwave-optimization
Potentially unexpected behavior from C++ `ArrayValidationNode`
- Dominant language
- C++
- Stars
- 31
- Forks
- 36
- Avg merge
- 16h 55m
- Merged PRs (30d)
- 8
Description
We currently use a number of asserts in the implementation file for `ArrayValidationNode`. See for instance https://github.com/dwavesystems/dwave-optimization/blob/e27f2339e6349632d48f78e8328b96580f37ebc8/dwave/optimization/src/nodes/testing.cpp#L188-L196
When using a version of `dwave-optimization` compiled without debug symbols as a shared library in a script compiled with debug symbols those `assert`s will be ignored. Whereas the ones in the header will be activated.
There are a few different ways to address this: templating, runtime [do_logging](https://github.com/dwavesystems/dwave-optimization/blob/e27f2339e6349632d48f78e8328b96580f37ebc8/dwave/optimization/include/dwave-optimization/nodes/testing.hpp#L39), header-only implementation, etc.
Contributor guide
Assessment
This issue has not been assessed yet.