dwavesystems / dwavesystems/dwave-optimization

Potentially unexpected behavior from C++ `ArrayValidationNode`

Open
#211 0 comments 0 reactions 0 assignees View on GitHub
bug
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.