Skip to content

Commit

Permalink
Fix clang error concerning structured bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
PucklaJ committed Apr 4, 2024
1 parent 41caba0 commit a858295
Showing 1 changed file with 23 additions and 3 deletions.
26 changes: 23 additions & 3 deletions test/key_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -966,10 +966,19 @@ TEST_CASE("none") {
}

{
auto [mid, ro, e, pr, sigy, etan, eppf, tdel] =
auto [_mid, _ro, _e, _pr, _sigy, _etan, _eppf, _tdel] =
card.parse_whole<int, float, float, float, float, float, float,
float>();

const auto mid = _mid;
const auto ro = _ro;
const auto e = _e;
const auto pr = _pr;
const auto sigy = _sigy;
const auto etan = _etan;
const auto eppf = _eppf;
const auto tdel = _tdel;

CHECK(mid == 1);
CHECK(ro == 9.879e-6f);
CHECK(e == 316.0f);
Expand All @@ -983,7 +992,13 @@ TEST_CASE("none") {
card = ks["MAT_PIECEWISE_LINEAR_PLASTICITY"][0][1];

{
auto [C, P, lcss, lcsr] = card.parse_whole<int, int, std::string, char *>();
auto [_C, _P, _lcss, _lcsr] =
card.parse_whole<int, int, std::string, char *>();

const auto C = _C;
const auto P = _P;
const auto lcss = _lcss;
const auto lcsr = _lcsr;

CHECK(C == 50);
CHECK(P == 6);
Expand Down Expand Up @@ -1012,9 +1027,14 @@ TEST_CASE("none") {
}

{
auto [C, P, lcss, lcsr] =
auto [_C, _P, _lcss, _lcsr] =
card.parse_whole<int, int, dro::String, dro::SizedString>();

const auto C = _C;
const auto P = _P;
const auto lcss = _lcss;
const auto lcsr = _lcsr;

CHECK(C == 50);
CHECK(P == 6);
CHECK(lcss == "");
Expand Down

0 comments on commit a858295

Please sign in to comment.