powsybl / powsybl-iidm4cpp

IIDM implementation for C++
https://www.powsybl.org
4 stars 2 forks source link

Fix usage of stdcxx::optional with C++-17 compliant compilers #412

Closed sebalaig closed 2 years ago

sebalaig commented 2 years ago

⚠️ Target branch to be defined ⚠️

Please check if the PR fulfills these requirements (please use '[x]' to check the checkboxes, or submit the PR and then click the checkboxes)

Does this PR already have an issue describing the problem ? If so, link to this issue using '#XXX' and skip the rest No

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...) Bug fix (fix compilation with C++-17 compliant compilers)

What is the current behavior? (You can also link to an open issue here) With C++-17 and newer versions, stdcxx::optional = std::optional. With older compilers, stdcxx::optional = boost::optional. Sometimes, we called stdcxx::optional::get() which is boost-specific => the library does not compile with recents compilers.

What is the new behavior (if this is a feature change)? Compilation is OK with C++-17 and newer compilers

Does this PR introduce a breaking change or deprecate an API? If yes, check the following:

Other information:

(if any of the questions/checkboxes don't apply, please delete them entirely)

sonarcloud[bot] commented 2 years ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

63.6% 63.6% Coverage
0.0% 0.0% Duplication