回答編集履歴
1
符号の分の文字列を考慮に入れていなかったのを修正
answer
CHANGED
@@ -8,7 +8,7 @@
|
|
8
8
|
TYPE* hogehoge_public(TYPE (&buf)[SIZE], int num, int DIGIT)
|
9
9
|
{
|
10
10
|
constexpr double log10 = 3.32192809489
|
11
|
-
static_assert(SIZE > std::numeric_limits<int>::digits / log10 +
|
11
|
+
static_assert(SIZE > std::numeric_limits<int>::digits / log10 + 2, "hogehoge usage: buffer is too small");
|
12
12
|
static_assert(SIZE > DIGIT, "hogehoge usage: buffer is too small");
|
13
13
|
hogehoge_private(buf, num, DIGIT);
|
14
14
|
return buf;
|