Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitebf6049

Browse files
committed
Fix StaticAssertExpr() under C++
The previous code didn't compile, because static_assert() must end witha semicolon. To fix, wrap it in a block, similar to the C code.
1 parent2e1d1eb commitebf6049

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎src/include/c.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -791,7 +791,7 @@ extern void ExceptionalCondition(const char *conditionName,
791791
#defineStaticAssertStmt(condition,errmessage) \
792792
static_assert(condition, errmessage)
793793
#defineStaticAssertExpr(condition,errmessage) \
794-
StaticAssertStmt(condition, errmessage)
794+
({ static_assert(condition, errmessage); })
795795
#else
796796
#defineStaticAssertStmt(condition,errmessage) \
797797
do { struct static_assert_struct { int static_assert_failure : (condition) ? 1 : -1; }; } while(0)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp