Skip to content

Commit

Permalink
static_assert without message is C++17
Browse files Browse the repository at this point in the history
  • Loading branch information
raphaelcoeffic committed Apr 3, 2022
1 parent d7d1e44 commit 581cb25
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion radio/src/strhelpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ void copyToTerminated(char (&dest)[DL], const char (&src)[SL],
static_assert(dl > 0, "wrong sizes or offset");
static constexpr size_t len = (dl < SL) ? dl : SL;
strncpy(&dest[O], &src[0], len);
static_assert((len + O) < DL);
static_assert((len + O) < DL, "wrong sizes of offset");
dest[len + O] = '\0';
}

Expand Down

0 comments on commit 581cb25

Please sign in to comment.