Skip to content

⬆️ require C++20 #897

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft

⬆️ require C++20 #897

wants to merge 4 commits into from

Conversation

burgholzer
Copy link
Member

Description

This PR updates the required C++ standard to C++20 in preparation for the v3 release.
The standard has been around for a while and it is time for us to move on from C++17.
The CI in this PR will prove that all tested configurations allow building the project.

Checklist:

  • The pull request only contains commits that are related to it.
  • I have added appropriate tests and documentation.
  • I have made sure that all CI jobs on GitHub pass.
  • The pull request introduces no new warnings and follows the project's style guidelines.

Signed-off-by: burgholzer <burgholzer@me.com>
Signed-off-by: burgholzer <burgholzer@me.com>
Signed-off-by: burgholzer <burgholzer@me.com>
@github-project-automation github-project-automation bot moved this to In Progress in MQT Core Apr 2, 2025
@burgholzer burgholzer self-assigned this Apr 2, 2025
@burgholzer burgholzer added major Major version update c++ Anything related to C++ code extensive-cpp-ci Adding this label indicates that extensive C++ CI runs should be started for this PR. extensive-python-ci Adding this label indicates that extensive Python CI runs should be started for this PR. code quality Code quality improvements labels Apr 2, 2025
Signed-off-by: burgholzer <burgholzer@me.com>
Copy link
Contributor

github-actions bot commented Apr 2, 2025

Cpp-Linter Report ⚠️

Some files did not pass the configured checks!

clang-tidy (v20.1.2) reports: 251 concern(s)
  • mlir/lib/Dialect/MQTOpt/Transforms/ToQuantumComputationPattern.cpp:110:5: warning: [modernize-use-ranges]

    use a ranges version of this algorithm

      110 |     std::transform(ins.begin(), ins.end(), insIndices.begin(),
          |     ^~~~~~~~~~~~~~ ~~~~~~~~~~~  ~~~~~~~~~
          |     std::ranges::transform ins
  • mlir/lib/Dialect/MQTOpt/Transforms/ToQuantumComputationPattern.cpp:137:5: warning: [modernize-use-ranges]

    use a ranges version of this algorithm

      137 |     std::transform(ctrlIns.begin(), ctrlIns.end(), ctrlInsIndices.begin(),
          |     ^~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~
          |     std::ranges::transform ctrlIns
  • mlir/lib/Dialect/MQTOpt/Transforms/ToQuantumComputationPattern.cpp:275:19: warning: [readability-container-contains]

    use 'contains' to check for membership

      275 |       if (visited.find(current) != visited.end()) {
          |                   ^~~~          ~~~~~~~~~~~~~~~~
          |                   contains
  • mlir/lib/Dialect/MQTOpt/Transforms/ToQuantumComputationPattern.cpp:305:21: warning: [readability-container-contains]

    use 'contains' to check for membership

      305 |         if (visited.find(user) != visited.end() ||
          |                     ^~~~       ~~~~~~~~~~~~~~~~
          |                     contains
  • mlir/lib/Dialect/MQTOpt/Transforms/ToQuantumComputationPattern.cpp:306:30: warning: [modernize-use-ranges]

    use a ranges version of this algorithm

      306 |             toVisit.end() != std::find(toVisit.begin(), toVisit.end(), user)) {
          |                              ^~~~~~~~~ ~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~
          |                              std::ranges::find toVisit
  • src/circuit_optimizer/CircuitOptimizer.cpp:59:17: warning: [readability-container-contains]

    use 'contains' to check for membership

       59 |     if (opTypes.find((*it)->getType()) != opTypes.end() &&
          |                 ^~~~                   ~~~~~~~~~~~~~~~~
          |                 contains
  • src/circuit_optimizer/CircuitOptimizer.cpp:67:21: warning: [readability-container-contains]

    use 'contains' to check for membership

       67 |             opTypes.find(cop->getType()) != opTypes.end() &&
          |                     ^~~~                 ~~~~~~~~~~~~~~~~
          |                     contains
  • src/circuit_optimizer/CircuitOptimizer.cpp:1236:34: warning: [readability-container-contains]

    use 'contains' to check for membership

     1236 |         if (missingLogicalQubits.find(targets[0]) !=
          |                                  ^~~~             ~~
          |                                  contains
     1237 |             missingLogicalQubits.end()) {
          |             ~~~~~~~~~~~~~~~~~~~~~~~~~~
  • src/circuit_optimizer/CircuitOptimizer.cpp:1253:34: warning: [readability-container-contains]

    use 'contains' to check for membership

     1253 |         if (missingLogicalQubits.find(targets[1]) !=
          |                                  ^~~~             ~~
          |                                  contains
     1254 |             missingLogicalQubits.end()) {
          |             ~~~~~~~~~~~~~~~~~~~~~~~~~~
  • src/circuit_optimizer/CircuitOptimizer.cpp:1280:23: warning: [readability-container-contains]

    use 'contains' to check for membership

     1280 |     if (logicalQubits.find(i) == logicalQubits.end()) {
          |                       ^~~~    ~~~~~~~~~~~~~~~~~~~~~~
          |         !             contains
  • src/circuit_optimizer/CircuitOptimizer.cpp:1300:32: warning: [readability-container-contains]

    use 'contains' to check for membership

     1300 |       if (missingLogicalQubits.find(i) != missingLogicalQubits.end()) {
          |                                ^~~~    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |                                contains
  • src/circuit_optimizer/CircuitOptimizer.cpp:1343:16: warning: [readability-container-contains]

    use 'contains' to check for membership

     1343 |     if (parent.find(index) == parent.end()) {
          |                ^~~~        ~~~~~~~~~~~~~~~
          |         !      contains
  • src/circuit_optimizer/CircuitOptimizer.cpp:1475:30: warning: [readability-container-contains]

    use 'contains' to check for membership

     1475 |               blocksAndSizes.find(block) != blocksAndSizes.end()) {
          |                              ^~~~        ~~~~~~~~~~~~~~~~~~~~~~~
          |                              contains
  • src/circuit_optimizer/CircuitOptimizer.cpp:1483:9: warning: [modernize-use-ranges]

    use a ranges version of this algorithm

     1483 |         std::sort(
          |         ^~~~~~~~~
          |         std::ranges::sort
     1484 |             sortedBlocks.begin(), sortedBlocks.end(),
          |             ~~~~~~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~~~~~~
          |             sortedBlocks
  • src/circuit_optimizer/CircuitOptimizer.cpp:1515:23: warning: [readability-container-contains]

    use 'contains' to check for membership

     1515 |           if (savings.find(block) != savings.end()) {
          |                       ^~~~        ~~~~~~~~~~~~~~~~
          |                       contains
  • src/circuit_optimizer/CircuitOptimizer.cpp:1525:9: warning: [modernize-use-ranges]

    use a ranges version of this algorithm

     1525 |         std::sort(
          |         ^~~~~~~~~
          |         std::ranges::sort
     1526 |             sortedSavings.begin(), sortedSavings.end(),
          |             ~~~~~~~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~~~~~~~
          |             sortedSavings
  • src/qasm3/Scanner.cpp:116:16: warning: [readability-container-contains]

    use 'contains' to check for membership

      116 |   if (keywords.find(t.str) != keywords.end()) {
          |                ^~~~        ~~~~~~~~~~~~~~~~~
          |                contains
  • src/qasm3/Scanner.cpp:674:10: warning: [modernize-use-ranges]

    use a ranges version of this algorithm

      674 |   return std::any_of(suffixes.begin(), suffixes.end(),
          |          ^~~~~~~~~~~ ~~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~~
          |          std::ranges::any_of suffixes
  • src/qasm3/Importer.cpp:422:15: warning: [readability-container-contains]

    use 'contains' to check for membership

      422 |     if (gates.find(identifier) == gates.end()) {
          |               ^~~~             ~~~~~~~~~~~~~~
          |         !     contains
  • src/qasm3/Importer.cpp:453:9: warning: [modernize-use-ranges]

    use a ranges version of this algorithm

      453 |     if (std::find(parameterIdentifiers.begin(), parameterIdentifiers.end(),
          |         ^~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~~~~~~~~~~~~~~
          |         std::ranges::find parameterIdentifiers
  • src/qasm3/Importer.cpp:463:9: warning: [modernize-use-ranges]

    use a ranges version of this algorithm

      463 |     if (std::find(qubitIdentifiers.begin(), qubitIdentifiers.end(),
          |         ^~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~~~~~~~~~~
          |         std::ranges::find qubitIdentifiers
  • src/qasm3/Importer.cpp:661:21: warning: [readability-container-contains]

    use 'contains' to check for membership

      661 |       if (allQubits.find(control.qubit) != allQubits.end()) {
          |                     ^~~~                ~~~~~~~~~~~~~~~~~~
          |                     contains
  • src/qasm3/Importer.cpp:668:21: warning: [readability-container-contains]

    use 'contains' to check for membership

      668 |       if (allQubits.find(qubit) != allQubits.end()) {
          |                     ^~~~        ~~~~~~~~~~~~~~~~~~
          |                     contains
  • src/qasm3/Importer.cpp:798:15: warning: [modernize-use-ranges]

    use a ranges version of this algorithm

      798 |               std::find(compoundGate->targetNames.begin(),
          |               ^~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |               std::ranges::find compoundGate->targetNames
      799 |                         compoundGate->targetNames.end(),
          |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  • src/qasm3/Importer.cpp:962:13: warning: [readability-container-contains]

    use 'contains' to check for membership

      962 |   if (gates.find(gateIdentifier) == gates.end()) {
          |             ^~~~                 ~~~~~~~~~~~~~~
          |       !     contains
  • src/ir/QuantumComputation.cpp:82:37: warning: [modernize-use-starts-ends-with]

    use ends_with instead of compare

       82 |       if (name.length() > 2 && name.compare(name.size() - 2, 2, "_l") == 0) {
          |                                     ^~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |                                     ends_with "_l")
  • src/ir/QuantumComputation.cpp:248:11: warning: [modernize-use-ranges]

    use a ranges version of this algorithm

      248 |   return *std::max_element(depths.begin(), depths.end());
          |           ^~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~  ~~~~~~~~~~~~
          |           std::ranges::max_element depths
  • src/ir/QuantumComputation.cpp:275:28: warning: [readability-container-contains]

    use 'contains' to check for membership

      275 |         if (measuredQubits.count(qubitidx) != 0) {
          |                            ^~~~~           ~~~~
          |                            contains
  • src/ir/QuantumComputation.cpp:308:26: warning: [readability-container-contains]

    use 'contains' to check for membership

      308 |       if (measuredQubits.find(it->first) == measuredQubits.end()) {
          |                          ^~~~            ~~~~~~~~~~~~~~~~~~~~~~~
          |           !              contains
  • src/ir/QuantumComputation.cpp:319:27: warning: [modernize-use-ranges]

    use a ranges version of this algorithm

      319 |     const bool isOutput = std::any_of(
          |                           ^~~~~~~~~~~
          |                           std::ranges::any_of
      320 |         outputPermutation.begin(), outputPermutation.end(),
          |         ~~~~~~~~~~~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~~~~~~~~~~~
          |         outputPermutation
  • src/ir/QuantumComputation.cpp:337:24: warning: [readability-container-contains]

    use 'contains' to check for membership

      337 |   if (quantumRegisters.count(regName) != 0) {
          |                        ^~~~~          ~~~~
          |                        contains
  • src/ir/QuantumComputation.cpp:369:26: warning: [readability-container-contains]

    use 'contains' to check for membership

      369 |   if (classicalRegisters.count(regName) != 0) {
          |                          ^~~~~          ~~~~
          |                          contains
  • src/ir/QuantumComputation.cpp:388:24: warning: [readability-container-contains]

    use 'contains' to check for membership

      388 |   if (ancillaRegisters.count(regName) != 0) {
          |                        ^~~~~          ~~~~
          |                        contains
  • src/ir/QuantumComputation.cpp:551:3: warning: [modernize-use-ranges]

    use a ranges version of this algorithm

      551 |   std::reverse(ops.begin(), ops.end());
          |   ^~~~~~~~~~~~ ~~~~~~~~~~~  ~~~~~~~~~
          |   std::ranges::reverse ops
  • src/ir/QuantumComputation.cpp:746:10: warning: [modernize-use-ranges]

    use a ranges version of this algorithm

      746 |   return std::none_of(
          |          ^~~~~~~~~~~~
          |          std::ranges::none_of
      747 |       ops.cbegin(), ops.cend(),
          |       ~~~~~~~~~~~~  ~~~~~~~~~~
          |       ops
  • src/ir/QuantumComputation.cpp:753:3: warning: [modernize-loop-convert]

    use range-based for loop instead

       41 |   for (auto physicalQubitIt = layoutCopy.rbegin();
          |   ^   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |       (auto & physicalQubitIt : std::ranges::reverse_view(layoutCopy))
       42 |        physicalQubitIt != layoutCopy.rend(); ++physicalQubitIt) {
          |        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       43 |     if (const auto physicalQubitIndex = physicalQubitIt->first;
          |                                         ~~~~~~~~~~~~~~~~~
          |                                         physicalQubitIt.
  • src/ir/QuantumComputation.cpp:845:10: warning: [modernize-use-ranges]

    use a ranges version of this algorithm

      845 |   return std::any_of(ancillaRegisters.cbegin(), ancillaRegisters.cend(),
          |          ^~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~~~~~~~~~~~
          |          std::ranges::any_of ancillaRegisters
  • src/ir/QuantumComputation.cpp:891:23: warning: [modernize-use-ranges]

    use a ranges version of this algorithm

      891 |   if (const auto it = std::find_if(initialLayout.cbegin(), initialLayout.cend(),
          |                       ^~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~~~~~~~~
          |                       std::ranges::find_if initialLayout
  • src/ir/QuantumComputation.cpp:947:28: warning: [readability-container-contains]

    use 'contains' to check for membership

      947 |     if (classicalRegisters.find(registerName) != classicalRegisters.end()) {
          |                            ^~~~               ~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |                            contains
  • src/ir/QuantumComputation.cpp:1014:38: warning: [modernize-use-ranges]

    use a ranges version of this algorithm

     1014 | void QuantumComputation::reverse() { std::reverse(ops.begin(), ops.end()); }
          |                                      ^~~~~~~~~~~~ ~~~~~~~~~~~  ~~~~~~~~~
          |                                      std::ranges::reverse ops
  • src/ir/QuantumComputation.cpp:1033:5: warning: [modernize-use-ranges]

    use a ranges version of this algorithm

     1033 |     std::generate(std::begin(randomData), std::end(randomData),
          |     ^~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~~~~~~~~
          |     std::ranges::generate randomData
  • src/ir/QuantumComputation.cpp:1091:10: warning: [modernize-use-ranges]

    use a ranges version of this algorithm

     1091 |   return std::all_of(ops.begin(), ops.end(),
          |          ^~~~~~~~~~~ ~~~~~~~~~~~  ~~~~~~~~~
          |          std::ranges::all_of ops
  • src/ir/QuantumComputation.cpp:1213:3: warning: [modernize-use-ranges]

    use a ranges version of this algorithm

     1213 |   std::move(newOps.begin(), newOps.end(), std::back_inserter(ops));
          |   ^~~~~~~~~ ~~~~~~~~~~~~~~  ~~~~~~~~~~~~
          |   std::ranges::move newOps
  • src/ir/QuantumComputation.cpp:1230:12: warning: [modernize-use-ranges]

    use a ranges version of this algorithm

     1230 |     return std::any_of(usedQubits.cbegin(), usedQubits.cend(),
          |            ^~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~~~~~
          |            std::ranges::any_of usedQubits
  • src/ir/QuantumComputation.cpp:1243:10: warning: [modernize-use-ranges]

    use a ranges version of this algorithm

     1243 |   return std::any_of(
          |          ^~~~~~~~~~~
          |          std::ranges::any_of
     1244 |       compOp.cbegin(), compOp.cend(),
          |       ~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~
          |       compOp
  • src/ir/QuantumComputation.cpp:1252:10: warning: [modernize-use-ranges]

    use a ranges version of this algorithm

     1252 |   return std::any_of(cbegin(), cend(), [&measured](const auto& op) {
          |          ^~~~~~~~~~~ ~~~~~~~~  ~~~~~~
          |          std::ranges::any_of cbegin
  • src/ir/Permutation.cpp:59:10: warning: [modernize-use-ranges]

    use a ranges version of this algorithm

       59 |   return std::max_element(
          |          ^~~~~~~~~~~~~~~~
          |          std::ranges::max_element
       60 |              cbegin(), cend(),
          |              ~~~~~~~~  ~~~~~~
          |              cbegin
  • src/ir/operations/SymbolicOperation.cpp:324:10: warning: [modernize-use-ranges]

    use a ranges version of this algorithm

      324 |   return std::any_of(symbolicParameter.begin(), symbolicParameter.end(),
          |          ^~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~~~~~~~~~~~
          |          std::ranges::any_of symbolicParameter
  • src/ir/operations/SymbolicOperation.cpp:328:10: warning: [modernize-use-ranges]

    use a ranges version of this algorithm

      328 |   return std::all_of(symbolicParameter.begin(), symbolicParameter.end(),
          |          ^~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~~~~~~~~~~~
          |          std::ranges::all_of symbolicParameter
  • src/ir/operations/AodOperation.cpp:119:11: warning: [modernize-use-ranges]

    use a ranges version of this algorithm

      119 |   return *std::max_element(distances.begin(), distances.end());
          |           ^~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~~~
          |           std::ranges::max_element distances
  • src/ir/operations/CompoundOperation.cpp:70:10: warning: [modernize-use-ranges]

    use a ranges version of this algorithm

       70 |   return std::any_of(ops.cbegin(), ops.cend(), [](const auto& op) {
          |          ^~~~~~~~~~~ ~~~~~~~~~~~~  ~~~~~~~~~~
          |          std::ranges::any_of ops
  • src/ir/operations/CompoundOperation.cpp:91:10: warning: [modernize-use-ranges]

    use a ranges version of this algorithm

       91 |   return std::any_of(ops.begin(), ops.end(),
          |          ^~~~~~~~~~~ ~~~~~~~~~~~  ~~~~~~~~~
          |          std::ranges::any_of ops
  • src/ir/operations/CompoundOperation.cpp:170:10: warning: [modernize-use-ranges]

    use a ranges version of this algorithm

      170 |   return std::any_of(ops.cbegin(), ops.cend(),
          |          ^~~~~~~~~~~ ~~~~~~~~~~~~  ~~~~~~~~~~
          |          std::ranges::any_of ops
  • src/ir/operations/CompoundOperation.cpp:202:10: warning: [modernize-use-ranges]

    use a ranges version of this algorithm

      202 |   return std::all_of(ops.cbegin(), ops.cend(),
          |          ^~~~~~~~~~~ ~~~~~~~~~~~~  ~~~~~~~~~~
          |          std::ranges::all_of ops
  • src/ir/operations/CompoundOperation.cpp:225:10: warning: [modernize-use-ranges]

    use a ranges version of this algorithm

      225 |         *std::max_element(thisUsedQubits.cbegin(), thisUsedQubits.cend());
          |          ^~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~~~~~~~~~
          |          std::ranges::max_element thisUsedQubits
  • src/ir/operations/CompoundOperation.cpp:227:5: warning: [modernize-use-ranges]

    use a ranges version of this algorithm

      227 |     std::for_each(cbegin(), cend(),
          |     ^~~~~~~~~~~~~ ~~~~~~~~  ~~~~~~
          |     std::ranges::for_each cbegin
  • src/ir/operations/CompoundOperation.cpp:232:10: warning: [modernize-use-ranges]

    use a ranges version of this algorithm

      232 |         *std::max_element(otherUsedQubits.cbegin(), otherUsedQubits.cend());
          |          ^~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~~~~~~~~~~
          |          std::ranges::max_element otherUsedQubits
  • src/ir/operations/CompoundOperation.cpp:234:5: warning: [modernize-use-ranges]

    use a ranges version of this algorithm

      234 |     std::for_each(co.cbegin(), co.cend(),
          |     ^~~~~~~~~~~~~ ~~~~~~~~~~~  ~~~~~~~~~
          |     std::ranges::for_each co
  • src/ir/operations/CompoundOperation.cpp:250:3: warning: [modernize-use-ranges]

    use a ranges version of this algorithm

      250 |   std::reverse(ops.begin(), ops.end());
          |   ^~~~~~~~~~~~ ~~~~~~~~~~~  ~~~~~~~~~
          |   std::ranges::reverse ops
  • src/ir/operations/NonUnitaryOperation.cpp:59:3: warning: [modernize-use-ranges]

    use a ranges version of this algorithm

       59 |   std::sort(targets.begin(), targets.end());
          |   ^~~~~~~~~ ~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~
          |   std::ranges::sort targets
  • src/ir/operations/NonUnitaryOperation.cpp:216:9: warning: [modernize-use-ranges]

    use a ranges version of this algorithm

      216 |     if (std::find(actualTargets.cbegin(), actualTargets.cend(), i) !=
          |         ^~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~~~~~~~~
          |         std::ranges::find actualTargets
  • src/ir/operations/Operation.cpp:78:9: warning: [modernize-use-ranges]

    use a ranges version of this algorithm

       78 |     if (std::find(actualTargets.cbegin(), actualTargets.cend(), q) !=
          |         ^~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~~~~~~~~
          |         std::ranges::find actualTargets
  • src/ir/operations/Operation.cpp:93:13: warning: [modernize-use-ranges]

    use a ranges version of this algorithm

       93 |             std::find(actualControls.cbegin(), actualControls.cend(), q);
          |             ^~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~~~~~~~~~
          |             std::ranges::find actualControls
  • src/ir/operations/StandardOperation.cpp:651:27: warning: [modernize-use-ranges]

    use a ranges version of this algorithm

      651 |   if (bool printBuiltin = std::none_of(
          |                           ^~~~~~~~~~~~
          |                           std::ranges::none_of
      652 |           controls.begin(), controls.end(),
          |           ~~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~~
          |           controls
  • src/na/NAComputation.cpp:102:13: warning: [modernize-use-ranges]

    use a ranges version of this algorithm

      102 |         if (std::any_of(opAtoms.begin(), opAtoms.end(),
          |             ^~~~~~~~~~~ ~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~
          |             std::ranges::any_of opAtoms
  • src/na/NAComputation.cpp:117:13: warning: [modernize-use-ranges]

    use a ranges version of this algorithm

      117 |         if (std::any_of(opAtoms.begin(), opAtoms.end(),
          |             ^~~~~~~~~~~ ~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~
          |             std::ranges::any_of opAtoms
  • src/algorithms/Grover.cpp:74:9: warning: [modernize-use-std-numbers]

    prefer 'std::numbers::sqrt2' to this formula

       74 |         std::sqrt(2)));
          |         ^~~~~~~~~~~~
          |         std::numbers::sqrt2
  • src/algorithms/Grover.cpp:96:3: warning: [modernize-use-ranges]

    use a ranges version of this algorithm

       96 |   std::reverse(expected.begin(), expected.end());
          |   ^~~~~~~~~~~~ ~~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~~
          |   std::ranges::reverse expected
  • src/algorithms/Grover.cpp:100:3: warning: [modernize-use-ranges]

    use a ranges version of this algorithm

      100 |   std::reverse(expected.begin(), expected.end());
          |   ^~~~~~~~~~~~ ~~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~~
          |   std::ranges::reverse expected
  • src/algorithms/BernsteinVazirani.cpp:49:3: warning: [modernize-use-ranges]

    use a ranges version of this algorithm

       49 |   std::reverse(expected.begin(), expected.end());
          |   ^~~~~~~~~~~~ ~~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~~
          |   std::ranges::reverse expected
  • src/algorithms/BernsteinVazirani.cpp:53:3: warning: [modernize-use-ranges]

    use a ranges version of this algorithm

       53 |   std::reverse(expected.begin(), expected.end());
          |   ^~~~~~~~~~~~ ~~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~~
          |   std::ranges::reverse expected
  • src/dd/UniqueTable.cpp:134:7: warning: [modernize-use-ranges]

    use a ranges version of this algorithm

      134 |   if (std::all_of(stats.begin(), stats.end(),
          |       ^~~~~~~~~~~ ~~~~~~~~~~~~~  ~~~~~~~~~~~
          |       std::ranges::all_of stats
  • src/dd/Simulation.cpp:50:5: warning: [modernize-use-ranges]

    use a ranges version of this algorithm

       50 |     std::generate(std::begin(randomData), std::end(randomData),
          |     ^~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~~~~~~~~
          |     std::ranges::generate randomData
  • src/dd/ComplexNumbers.cpp:40:10: warning: [modernize-use-designated-initializers]

    use designated initializer list to initialize 'Complex'

       40 |   return {a.r, RealNumber::flipPointerSign(a.i)};
          |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |           .r=  .i=
    /home/runner/work/core/core/include/mqt-core/dd/Complex.hpp:29:1: note: aggregate type is defined here
       29 | struct Complex {
          | ^
  • src/dd/ComplexNumbers.cpp:44:10: warning: [modernize-use-designated-initializers]

    use designated initializer list to initialize 'Complex'

       44 |   return {RealNumber::flipPointerSign(a.r), RealNumber::flipPointerSign(a.i)};
          |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |           .r=                               .i=
    /home/runner/work/core/core/include/mqt-core/dd/Complex.hpp:29:1: note: aggregate type is defined here
       29 | struct Complex {
          | ^
  • src/dd/ComplexNumbers.cpp:76:10: warning: [modernize-use-designated-initializers]

    use designated initializer list to initialize 'Complex'

       76 |   return {uniqueTable->lookup(r), &constants::zero};
          |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |           .r=                     .i=
    /home/runner/work/core/core/include/mqt-core/dd/Complex.hpp:29:1: note: aggregate type is defined here
       29 | struct Complex {
          | ^
  • src/dd/ComplexNumbers.cpp:80:10: warning: [modernize-use-designated-initializers]

    use designated initializer list to initialize 'Complex'

       80 |   return {uniqueTable->lookup(r), uniqueTable->lookup(i)};
          |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |           .r=                     .i=
    /home/runner/work/core/core/include/mqt-core/dd/Complex.hpp:29:1: note: aggregate type is defined here
       29 | struct Complex {
          | ^
  • src/dd/Package.cpp:284:12: warning: [modernize-use-designated-initializers]

    use designated initializer list to initialize 'Edgedd::vNode'

      284 |           {{leftSubtree.p, {&constants::sqrt2over2, &constants::zero}},
          |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |             .p=            .w=
    /home/runner/work/core/core/include/mqt-core/dd/Edge.hpp:56:23: note: aggregate type is defined here
       56 | template <class Node> struct Edge {
          |                       ^
  • src/dd/Package.cpp:284:28: warning: [modernize-use-designated-initializers]

    use designated initializer list to initialize 'Complex'

      284 |           {{leftSubtree.p, {&constants::sqrt2over2, &constants::zero}},
          |                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |                             .r=                     .i=
    /home/runner/work/core/core/include/mqt-core/dd/Complex.hpp:29:1: note: aggregate type is defined here
       29 | struct Complex {
          | ^
  • src/dd/Package.cpp:285:12: warning: [modernize-use-designated-initializers]

    use designated initializer list to initialize 'Edgedd::vNode'

      285 |            {rightSubtree.p, {&constants::sqrt2over2, &constants::zero}}}});
          |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |             .p=             .w=
    /home/runner/work/core/core/include/mqt-core/dd/Edge.hpp:56:23: note: aggregate type is defined here
       56 | template <class Node> struct Edge {
          |                       ^
  • src/dd/Package.cpp:285:29: warning: [modernize-use-designated-initializers]

    use designated initializer list to initialize 'Complex'

      285 |            {rightSubtree.p, {&constants::sqrt2over2, &constants::zero}}}});
          |                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |                              .r=                     .i=
    /home/runner/work/core/core/include/mqt-core/dd/Complex.hpp:29:1: note: aggregate type is defined here
       29 | struct Complex {
          | ^
  • src/dd/Package.cpp:355:7: warning: [modernize-use-ranges]

    use a ranges version of this algorithm

      355 |   if (std::any_of(controls.begin(), controls.end(),
          |       ^~~~~~~~~~~ ~~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~~
          |       std::ranges::any_of controls
  • src/dd/Package.cpp:432:7: warning: [modernize-use-ranges]

    use a ranges version of this algorithm

      432 |   if (std::any_of(controls.begin(), controls.end(),
          |       ^~~~~~~~~~~ ~~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~~
          |       std::ranges::any_of controls
  • src/dd/Package.cpp:724:19: warning: [readability-container-contains]

    use 'contains' to check for membership

      724 |       if (visited.find(s0.p) != visited.end()) {
          |                   ^~~~       ~~~~~~~~~~~~~~~~
          |                   contains
  • src/dd/Package.cpp:737:19: warning: [readability-container-contains]

    use 'contains' to check for membership

      737 |       if (visited.find(s1.p) != visited.end()) {
          |                   ^~~~       ~~~~~~~~~~~~~~~~
          |                   contains
  • src/dd/Package.cpp:974:12: warning: [modernize-use-designated-initializers]

    use designated initializer list to initialize 'Edgedd::vNode'

      974 |       e1 = {x.p, Complex::one()};
          |            ^~~~~~~~~~~~~~~~~~~~~
          |             .p=  .w=
    /home/runner/work/core/core/include/mqt-core/dd/Edge.hpp:56:23: note: aggregate type is defined here
       56 | template <class Node> struct Edge {
          |                       ^
  • src/dd/Package.cpp:980:12: warning: [modernize-use-designated-initializers]

    use designated initializer list to initialize 'Edgedd::vNode'

      980 |       e2 = {y.p, Complex::one()};
          |            ^~~~~~~~~~~~~~~~~~~~~
          |             .p=  .w=
    /home/runner/work/core/core/include/mqt-core/dd/Edge.hpp:56:23: note: aggregate type is defined here
       56 | template <class Node> struct Edge {
          |                       ^
  • src/dd/Package.cpp:1058:15: warning: [readability-container-contains]

    use 'contains' to check for membership

     1058 |   if (visited.find(m.p) != visited.end()) {
          |               ^~~~      ~~~~~~~~~~~~~~~~
          |               contains
  • src/dd/Package.cpp:1128:7: warning: [modernize-use-ranges]

    use a ranges version of this algorithm

     1128 |   if (std::none_of(ancillary.begin(), ancillary.end(),
          |       ^~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~~~
          |       std::ranges::none_of ancillary
  • src/dd/Package.cpp:1177:8: warning: [modernize-use-ranges]

    use a ranges version of this algorithm

     1177 |       (std::none_of(garbage.begin(), garbage.end(), [](bool v) { return v; }) ||
          |        ^~~~~~~~~~~~ ~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~
          |        std::ranges::none_of garbage
  • src/dd/Package.cpp:1206:8: warning: [modernize-use-ranges]

    use a ranges version of this algorithm

     1206 |       (std::none_of(garbage.begin(), garbage.end(), [](bool v) { return v; }) ||
          |        ^~~~~~~~~~~~ ~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~
          |        std::ranges::none_of garbage
  • src/dd/NoiseFunctionality.cpp:309:7: warning: [modernize-use-ranges]

    use a ranges version of this algorithm

      309 |   if (std::any_of(
          |       ^~~~~~~~~~~
          |       std::ranges::any_of
      310 |           usedQubits.begin(), usedQubits.end(),
          |           ~~~~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~~~~
          |           usedQubits
  • src/dd/Export.cpp:499:25: warning: [readability-container-contains]

    use 'contains' to check for membership

      499 |           if (nodeIndex.find(edge.p) != nodeIndex.end()) {
          |                         ^~~~         ~~~~~~~~~~~~~~~~~~
          |                         contains
  • src/dd/Export.cpp:518:23: warning: [readability-container-contains]

    use 'contains' to check for membership

      518 |         if (nodeIndex.find(edge.p) != nodeIndex.end()) {
          |                       ^~~~         ~~~~~~~~~~~~~~~~~~
          |                       contains
  • src/dd/Export.cpp:532:23: warning: [readability-container-contains]

    use 'contains' to check for membership

      532 |         if (nodeIndex.find(node->p) != nodeIndex.end()) {
          |                       ^~~~          ~~~~~~~~~~~~~~~~~~
          |                       contains
  • src/dd/Export.cpp:586:19: warning: [readability-container-contains]

    use 'contains' to check for membership

      586 |     if (nodeIndex.find(basic.p) == nodeIndex.end()) {
          |                   ^~~~          ~~~~~~~~~~~~~~~~~~
          |         !         contains
  • src/dd/ComplexValue.cpp:62:17: warning: [modernize-use-ranges]

    use a ranges version of this algorithm

       62 |   imagStr.erase(remove(imagStr.begin(), imagStr.end(), ' '), imagStr.end());
          |                 ^~~~~~ ~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~
          |                 std::ranges::remove imagStr
  • src/dd/ComplexValue.cpp:63:17: warning: [modernize-use-ranges]

    use a ranges version of this algorithm

       63 |   imagStr.erase(remove(imagStr.begin(), imagStr.end(), 'i'), imagStr.end());
          |                 ^~~~~~ ~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~
          |                 std::ranges::remove imagStr
  • src/zx/Rules.cpp:31:10: warning: [modernize-use-ranges]

    use a ranges version of this algorithm

       31 |   return std::all_of(edges.begin(), edges.end(), [&](auto& edge) {
          |          ^~~~~~~~~~~ ~~~~~~~~~~~~~  ~~~~~~~~~~~
          |          std::ranges::all_of edges
  • src/zx/Rules.cpp:125:17: warning: [modernize-use-designated-initializers]

    use designated initializer list to initialize 'VertexData'

      125 |       VertexData{0, 0, PiExpression(), VertexType::X});
          |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |                  .col= .qubit= .phase= .type=
    /home/runner/work/core/core/include/mqt-core/zx/Utils.hpp:45:1: note: aggregate type is defined here
       45 | struct VertexData {
          | ^
  • src/zx/Rules.cpp:131:10: warning: [modernize-use-ranges]

    use a ranges version of this algorithm

      131 |   return std::all_of(edges.begin(), edges.end(), [&](auto& edge) {
          |          ^~~~~~~~~~~ ~~~~~~~~~~~~~  ~~~~~~~~~~~
          |          std::ranges::all_of edges
  • src/zx/Rules.cpp:157:17: warning: [modernize-use-designated-initializers]

    use designated initializer list to initialize 'VertexData'

      157 |       VertexData{0, 0, PiExpression(), VertexType::X});
          |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |                  .col= .qubit= .phase= .type=
    /home/runner/work/core/core/include/mqt-core/zx/Utils.hpp:45:1: note: aggregate type is defined here
       45 | struct VertexData {
          | ^
  • src/zx/Rules.cpp:159:17: warning: [modernize-use-designated-initializers]

    use designated initializer list to initialize 'VertexData'

      159 |       VertexData{0, 0, PiExpression(), VertexType::X});
          |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |                  .col= .qubit= .phase= .type=
    /home/runner/work/core/core/include/mqt-core/zx/Utils.hpp:45:1: note: aggregate type is defined here
       45 | struct VertexData {
          | ^
  • src/zx/Rules.cpp:177:8: warning: [modernize-use-ranges]

    use a ranges version of this algorithm

      177 |   if (!std::all_of(v0Edges.begin(), v0Edges.end(), isValidEdge)) {
          |        ^~~~~~~~~~~ ~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~
          |        std::ranges::all_of v0Edges
  • src/zx/Rules.cpp:183:10: warning: [modernize-use-ranges]

    use a ranges version of this algorithm

      183 |   return std::all_of(v1Edges.begin(), v1Edges.end(), isValidEdge);
          |          ^~~~~~~~~~~ ~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~
          |          std::ranges::all_of v1Edges
  • src/zx/Rules.cpp:240:7: warning: [modernize-use-ranges]

    use a ranges version of this algorithm

      240 |   if (std::any_of(v0Edges.begin(), v0Edges.end(), isInvalidEdge)) {
          |       ^~~~~~~~~~~ ~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~
          |       std::ranges::any_of v0Edges
  • src/zx/Rules.cpp:245:7: warning: [modernize-use-ranges]

    use a ranges version of this algorithm

      245 |   if (std::any_of(v1Edges.begin(), v1Edges.end(), isInvalidEdge)) {
          |       ^~~~~~~~~~~ ~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~
          |       std::ranges::any_of v1Edges
  • src/zx/FunctionalityConstruction.cpp:44:14: warning: [modernize-use-integer-sign-comparison]

    comparison between 'signed' and 'unsigned' integers

       44 |       return ctrl == static_cast<Qubit>(tar1) && tar1 == ctrl2 &&
          |              ^    ~~~~~~~~~~~~~~~~~~~~~~
          |              std::cmp_equal( ,               )
  • src/zx/FunctionalityConstruction.cpp:45:14: warning: [modernize-use-integer-sign-comparison]

    comparison between 'signed' and 'unsigned' integers

       27 |              target == static_cast<Qubit>(ctrl1) && ctrl1 == tar2;
          |              ^      ~~~~~~~~~~~~~~~~~~~~~~
          |              std::cmp_equal( ,                  )
  • src/zx/FunctionalityConstruction.cpp:627:10: warning: [modernize-use-ranges]

    use a ranges version of this algorithm

      627 |   return std::all_of(qc->cbegin(), qc->cend(), [&](const auto& op) {
          |          ^~~~~~~~~~~ ~~~~~~~~~~~~  ~~~~~~~~~~
          |          std::ranges::all_of qc
  • src/zx/FunctionalityConstruction.cpp:636:12: warning: [modernize-use-ranges]

    use a ranges version of this algorithm

      636 |     return std::all_of(compOp->cbegin(), compOp->cend(),
          |            ^~~~~~~~~~~ ~~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~~
          |            std::ranges::all_of compOp
  • src/zx/ZXDiagram.cpp:99:18: warning: [modernize-use-ranges]

    use a ranges version of this algorithm

       99 |   incident.erase(std::remove_if(incident.begin(), incident.end(),
          |                  ^~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~~
          |                  std::ranges::remove_if incident
  • src/zx/ZXDiagram.cpp:121:20: warning: [modernize-use-designated-initializers]

    use designated initializer list to initialize 'VertexData'

      121 |   return addVertex({col, qubit, phase, type});
          |                    ^~~~~~~~~~~~~~~~~~~~~~~~~
          |                     .col=.qubit=.phase=.type=
    /home/runner/work/core/core/include/mqt-core/zx/Utils.hpp:45:1: note: aggregate type is defined here
       45 | struct VertexData {
          | ^
  • src/zx/ZXDiagram.cpp:156:21: warning: [modernize-use-ranges]

    use a ranges version of this algorithm

      156 |   const auto edge = std::find_if(incident.begin(), incident.end(),
          |                     ^~~~~~~~~~~~ ~~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~~
          |                     std::ranges::find_if incident
  • src/zx/ZXDiagram.cpp:165:21: warning: [modernize-use-ranges]

    use a ranges version of this algorithm

      165 |   const auto edge = std::find_if(incident.begin(), incident.end(),
          |                     ^~~~~~~~~~~~ ~~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~~
          |                     std::ranges::find_if incident
  • src/zx/ZXDiagram.cpp:176:10: warning: [modernize-use-ranges]

    use a ranges version of this algorithm

      176 |   return std::find_if(incident.begin(), incident.end(),
          |          ^~~~~~~~~~~~ ~~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~~
          |          std::ranges::find_if incident
  • src/zx/ZXDiagram.cpp:194:10: warning: [modernize-use-ranges]

    use a ranges version of this algorithm

      194 |   return std::find(inputs.begin(), inputs.end(), v) != inputs.end();
          |          ^~~~~~~~~ ~~~~~~~~~~~~~~  ~~~~~~~~~~~~
          |          std::ranges::find inputs
  • src/zx/ZXDiagram.cpp:197:10: warning: [modernize-use-ranges]

    use a ranges version of this algorithm

      197 |   return std::find(outputs.begin(), outputs.end(), v) != outputs.end();
          |          ^~~~~~~~~ ~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~
          |          std::ranges::find outputs
  • src/zx/ZXDiagram.cpp:310:9: warning: [modernize-use-designated-initializers]

    use designated initializer list to initialize 'VertexData'

      310 |         {1, static_cast<Qubit>(i), PiExpression(), VertexType::Boundary});
          |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |          .col= .qubit=             .phase=         .type=
    /home/runner/work/core/core/include/mqt-core/zx/Utils.hpp:45:1: note: aggregate type is defined here
       45 | struct VertexData {
          | ^
  • src/zx/ZXDiagram.cpp:326:9: warning: [modernize-use-designated-initializers]

    use designated initializer list to initialize 'VertexData'

      326 |         {vData->col + 1, vData->qubit, PiExpression(), VertexType::Boundary});
          |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |          .col=           .qubit=       .phase=         .type=
    /home/runner/work/core/core/include/mqt-core/zx/Utils.hpp:45:1: note: aggregate type is defined here
       45 | struct VertexData {
          | ^
  • src/zx/ZXDiagram.cpp:362:19: warning: [readability-container-contains]

    use 'contains' to check for membership

      362 |       if (visited.find(w) != visited.end()) {
          |                   ^~~~    ~~~~~~~~~~~~~~~~
          |                   contains
  • src/zx/ZXDiagram.cpp:413:23: warning: [modernize-use-ranges]

    use a ranges version of this algorithm

      413 |       const auto& p = std::lower_bound(connected.begin(), connected.end(), to);
          |                       ^~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~~~
          |                       std::ranges::lower_bound connected
  • src/zx/ZXDiagram.cpp:427:10: warning: [modernize-use-ranges]

    use a ranges version of this algorithm

      427 |   return std::find(vertices.begin(), vertices.end(), v) != vertices.end();
          |          ^~~~~~~~~ ~~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~~
          |          std::ranges::find vertices
  • test/ir/test_qfr_functionality.cpp:68:5: warning: [modernize-use-ranges]

    use a ranges version of this algorithm

       68 |     std::generate(begin(randomData), end(randomData), [&]() { return rd(); });
          |     ^~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~~~
          |     std::ranges::generate randomData
  • test/ir/test_io.cpp:61:14: warning: [modernize-use-ranges]

    use a ranges version of this algorithm

       61 |   str1.erase(std::remove_if(str1.begin(), str1.end(), isspace), str1.end());
          |              ^~~~~~~~~~~~~~ ~~~~~~~~~~~~  ~~~~~~~~~~
          |              std::ranges::remove_if str1
  • test/ir/test_io.cpp:62:14: warning: [modernize-use-ranges]

    use a ranges version of this algorithm

       62 |   str2.erase(std::remove_if(str2.begin(), str2.end(), isspace), str2.end());
          |              ^~~~~~~~~~~~~~ ~~~~~~~~~~~~  ~~~~~~~~~~
          |              std::ranges::remove_if str2
  • test/ir/test_qasm3_parser.cpp:2405:51: warning: [modernize-use-std-numbers]

    prefer 'std::numbers::e' to this formula

     2405 |                 qasm3::const_eval::ConstEvalValue(std::exp(1.0))},
          |                                                   ^~~~~~~~~~~~~
          |                                                   std::numbers::e
  • test/na/test_nacomputation.cpp:47:34: warning: [modernize-use-designated-initializers]

    use designated initializer list to initialize 'Extent'

       47 |   const auto zone = Zone("zone", {0, 0, 2, 2});
          |                                  ^~~~~~~~~~~~
          |                                   .minX= .minY= .maxX= .maxY=
    /home/runner/work/core/core/include/mqt-core/na/entities/Zone.hpp:33:3: note: aggregate type is defined here
       33 |   struct Extent {
          |   ^
  • test/na/test_nacomputation.cpp:55:25: warning: [modernize-use-designated-initializers]

    use designated initializer list to initialize 'Location'

       55 |   constexpr Location loc{3, 4};
          |                         ^~~~~~
          |                          .x=.y=
    /home/runner/work/core/core/include/mqt-core/na/entities/Location.hpp:30:1: note: aggregate type is defined here
       30 | struct Location final {
          | ^
  • test/na/test_nacomputation.cpp:90:46: warning: [modernize-use-designated-initializers]

    use designated initializer list to initialize 'Location'

       90 |                          std::vector{Location{0, 1}, Location{1, 1}});
          |                                              ^~~~~~
          |                                               .x=.y=
    /home/runner/work/core/core/include/mqt-core/na/entities/Location.hpp:30:1: note: aggregate type is defined here
       30 | struct Location final {
          | ^
  • test/na/test_nacomputation.cpp:90:62: warning: [modernize-use-designated-initializers]

    use designated initializer list to initialize 'Location'

       90 |                          std::vector{Location{0, 1}, Location{1, 1}});
          |                                                              ^~~~~~
          |                                                               .x=.y=
    /home/runner/work/core/core/include/mqt-core/na/entities/Location.hpp:30:1: note: aggregate type is defined here
       30 | struct Location final {
          | ^
  • test/na/test_nacomputation.cpp:92:46: warning: [modernize-use-designated-initializers]

    use designated initializer list to initialize 'Location'

       92 |                          std::vector{Location{4, 1}, Location{5, 1}});
          |                                              ^~~~~~
          |                                               .x=.y=
    /home/runner/work/core/core/include/mqt-core/na/entities/Location.hpp:30:1: note: aggregate type is defined here
       30 | struct Location final {
          | ^
  • test/na/test_nacomputation.cpp:92:62: warning: [modernize-use-designated-initializers]

    use designated initializer list to initialize 'Location'

       92 |                          std::vector{Location{4, 1}, Location{5, 1}});
          |                                                              ^~~~~~
          |                                                               .x=.y=
    /home/runner/work/core/core/include/mqt-core/na/entities/Location.hpp:30:1: note: aggregate type is defined here
       30 | struct Location final {
          | ^
  • test/na/test_nacomputation.cpp:94:47: warning: [modernize-use-designated-initializers]

    use designated initializer list to initialize 'Location'

       94 |                           std::vector{Location{4, 0}, Location{5, 0}});
          |                                               ^~~~~~
          |                                                .x=.y=
    /home/runner/work/core/core/include/mqt-core/na/entities/Location.hpp:30:1: note: aggregate type is defined here
       30 | struct Location final {
          | ^
  • test/na/test_nacomputation.cpp:94:63: warning: [modernize-use-designated-initializers]

    use designated initializer list to initialize 'Location'

       94 |                           std::vector{Location{4, 0}, Location{5, 0}});
          |                                                               ^~~~~~
          |                                                                .x=.y=
    /home/runner/work/core/core/include/mqt-core/na/entities/Location.hpp:30:1: note: aggregate type is defined here
       30 | struct Location final {
          | ^
  • test/na/test_nacomputation.cpp:151:46: warning: [modernize-use-designated-initializers]

    use designated initializer list to initialize 'Location'

      151 |                          std::vector{Location{0, 1}, Location{1, 1}});
          |                                              ^~~~~~
          |                                               .x=.y=
    /home/runner/work/core/core/include/mqt-core/na/entities/Location.hpp:30:1: note: aggregate type is defined here
       30 | struct Location final {
          | ^
  • test/na/test_nacomputation.cpp:151:62: warning: [modernize-use-designated-initializers]

    use designated initializer list to initialize 'Location'

      151 |                          std::vector{Location{0, 1}, Location{1, 1}});
          |                                                              ^~~~~~
          |                                                               .x=.y=
    /home/runner/work/core/core/include/mqt-core/na/entities/Location.hpp:30:1: note: aggregate type is defined here
       30 | struct Location final {
          | ^
  • test/na/test_nacomputation.cpp:153:42: warning: [modernize-use-designated-initializers]

    use designated initializer list to initialize 'Location'

      153 |   qc.emplaceBack<LoadOp>(*atom0, Location{0, 1});
          |                                          ^~~~~~
          |                                           .x=.y=
    /home/runner/work/core/core/include/mqt-core/na/entities/Location.hpp:30:1: note: aggregate type is defined here
       30 | struct Location final {
          | ^
  • test/na/test_nacomputation.cpp:157:42: warning: [modernize-use-designated-initializers]

    use designated initializer list to initialize 'Location'

      157 |   qc.emplaceBack<MoveOp>(*atom0, Location{0, 1});
          |                                          ^~~~~~
          |                                           .x=.y=
    /home/runner/work/core/core/include/mqt-core/na/entities/Location.hpp:30:1: note: aggregate type is defined here
       30 | struct Location final {
          | ^
  • test/na/test_nacomputation.cpp:163:46: warning: [modernize-use-designated-initializers]

    use designated initializer list to initialize 'Location'

      163 |                          std::vector{Location{0, 1}, Location{1, 1}});
          |                                              ^~~~~~
          |                                               .x=.y=
    /home/runner/work/core/core/include/mqt-core/na/entities/Location.hpp:30:1: note: aggregate type is defined here
       30 | struct Location final {
          | ^
  • test/na/test_nacomputation.cpp:163:62: warning: [modernize-use-designated-initializers]

    use designated initializer list to initialize 'Location'

      163 |                          std::vector{Location{0, 1}, Location{1, 1}});
          |                                                              ^~~~~~
          |                                                               .x=.y=
    /home/runner/work/core/core/include/mqt-core/na/entities/Location.hpp:30:1: note: aggregate type is defined here
       30 | struct Location final {
          | ^

Have any feedback or feature suggestions? Share it here.

@burgholzer
Copy link
Member Author

Alright. I do not have the time to look into these diverse errors at the moment.
This will have to wait for v3.1+.
If anyone wants to pick this up, feel free to.

@burgholzer burgholzer added help wanted Extra attention is needed minor Minor version update and removed major Major version update labels Apr 3, 2025
@burgholzer burgholzer moved this from In Progress to On Hold in MQT Core Apr 11, 2025
@burgholzer burgholzer moved this to On Hold in MQT Core Apr 11, 2025
@burgholzer burgholzer marked this pull request as draft April 11, 2025 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ Anything related to C++ code code quality Code quality improvements extensive-cpp-ci Adding this label indicates that extensive C++ CI runs should be started for this PR. extensive-python-ci Adding this label indicates that extensive Python CI runs should be started for this PR. help wanted Extra attention is needed minor Minor version update
Projects
Status: On Hold
Development

Successfully merging this pull request may close these issues.

1 participant