Skip to content

Commit af6e184

Browse files
committed
jansson: Disable format string validation if constexpr vector is not available
Signed-off-by: Philipp Jungkamp <philipp.jungkamp@rwth-aachen.de>
1 parent 1cf4acc commit af6e184

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

common/include/villas/jansson.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,9 @@ void janssonUnpack(::json_t *json,
297297
template <typename... Args> class JanssonPackFormatString {
298298
public:
299299
consteval JanssonPackFormatString(char const *fmt) : fmt(fmt) {
300+
#if defined(__cpp_lib_constexpr_vector) && __cpp_constexpr >= 201907L
300301
validate(fmt);
302+
#endif
301303
}
302304

303305
constexpr char const *c_str() const { return fmt; }

0 commit comments

Comments
 (0)