Skip to content

Commit 0d475a5

Browse files
committed
CI fixes
1 parent d8d105d commit 0d475a5

File tree

2 files changed

+19
-4
lines changed

2 files changed

+19
-4
lines changed

examples/14_json_template.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@
33
int main()
44
{
55
std::string config = R"(
6-
iteration_encoding = "variable_based"
7-
8-
[json]
9-
mode = "template"
6+
{
7+
"iteration_encoding": "variable_based",
8+
"json": {
9+
"mode": "template"
10+
}
11+
}
1012
)";
1113

1214
openPMD::Series writeTemplate(

src/IO/JSON/JSONIOHandlerImpl.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,20 @@ namespace
7272
{
7373
return T{};
7474
}
75+
#if defined(__INTEL_COMPILER)
76+
/*
77+
* ICPC has trouble with if constexpr, thinking that return statements are
78+
* missing afterwards. Deactivate the warning.
79+
* Note that putting a statement here will not help to fix this since it will
80+
* then complain about unreachable code.
81+
* https://community.intel.com/t5/Intel-C-Compiler/quot-if-constexpr-quot-and-quot-missing-return-statement-quot-in/td-p/1154551
82+
*/
83+
#pragma warning(disable : 1011)
84+
}
85+
#pragma warning(default : 1011)
86+
#else
7587
}
88+
#endif
7689

7790
static constexpr char const *errorMsg = "JSON default value";
7891
};

0 commit comments

Comments
 (0)