Skip to content

Commit

Permalink
CI fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
franzpoeschel committed May 18, 2022
1 parent d8d105d commit 0d475a5
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
10 changes: 6 additions & 4 deletions examples/14_json_template.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@
int main()
{
std::string config = R"(
iteration_encoding = "variable_based"
[json]
mode = "template"
{
"iteration_encoding": "variable_based",
"json": {
"mode": "template"
}
}
)";

openPMD::Series writeTemplate(
Expand Down
13 changes: 13 additions & 0 deletions src/IO/JSON/JSONIOHandlerImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,20 @@ namespace
{
return T{};
}
#if defined(__INTEL_COMPILER)
/*
* ICPC has trouble with if constexpr, thinking that return statements are
* missing afterwards. Deactivate the warning.
* Note that putting a statement here will not help to fix this since it will
* then complain about unreachable code.
* https://community.intel.com/t5/Intel-C-Compiler/quot-if-constexpr-quot-and-quot-missing-return-statement-quot-in/td-p/1154551
*/
#pragma warning(disable : 1011)
}
#pragma warning(default : 1011)
#else
}
#endif

static constexpr char const *errorMsg = "JSON default value";
};
Expand Down

0 comments on commit 0d475a5

Please sign in to comment.