diff options
author | Ed Schouten <ed@FreeBSD.org> | 2011-12-29 14:41:17 +0000 |
---|---|---|
committer | Ed Schouten <ed@FreeBSD.org> | 2011-12-29 14:41:17 +0000 |
commit | ffa01562fdfcf57f38e300e4631665a919632814 (patch) | |
tree | 50309d6357daf075303c5d87a8558a92b3f59fe4 /include | |
parent | 47e236b1780e464ff0d4ca15851c74d7c96426ba (diff) | |
download | src-ffa01562fdfcf57f38e300e4631665a919632814.tar.gz src-ffa01562fdfcf57f38e300e4631665a919632814.zip |
Notes
Diffstat (limited to 'include')
-rw-r--r-- | include/assert.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/include/assert.h b/include/assert.h index 6633d8f96ff7..c880a782b963 100644 --- a/include/assert.h +++ b/include/assert.h @@ -58,7 +58,16 @@ #ifndef _ASSERT_H_ #define _ASSERT_H_ -#if __ISO_C_VISIBLE >= 2011 && (!defined(__cplusplus) || __cplusplus < 201103L) +/* + * Static assertions. In principle we could define static_assert for + * C++ older than C++11, but this breaks if _Static_assert is + * implemented as a macro. + * + * C++ template parameters may contain commas, even if not enclosed in + * parentheses, causing the _Static_assert macro to be invoked with more + * than two parameters. + */ +#if __ISO_C_VISIBLE >= 2011 && !defined(__cplusplus) #define static_assert _Static_assert #endif |