The NetBSD Project

CVS log for src/include/assert.h

[BACK] Up to [cvs.NetBSD.org] / src / include

Request diff between arbitrary revisions


Default branch: MAIN
Current tag: netbsd-8-0-RC2


Revision 1.22 / (download) - annotate - [select for diffs], Mon Oct 3 12:08:39 2016 UTC (7 years, 6 months ago) by kamil
Branch: MAIN
CVS Tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, phil-wifi-base, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-compat-merge-20190127, pgoyette-compat-base, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315, pgoyette-compat, perseant-stdc-iso10646-base, perseant-stdc-iso10646, netbsd-8-base, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, matt-nb8-mediatek-base, matt-nb8-mediatek, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan
Branch point for: phil-wifi, netbsd-8
Changes since 1.21: +7 -1 lines
Diff to previous 1.21 (colored)

Add static_assert macro definition in <assert.h>

This declaration conforms to the C11 standard
Reference: ISO/IEC 9899:201x 7.2 Diagnostics <assert.h>

_Static_assert performs compile-time assertion checking.

According to ISO/IEC 9899:201x (draft) 7.2 Diagnostics <assert.h> defines
the static_assert macro which expands to _Static_assert. It's not
conditionalized by NDEBUG like the assert macro.

According to ISO/IEC N3242=11-0012 (C++1x) the <cassert> header shall
define only the assert macro, but not static_assert as it's already part
of the C++11 language.

Allow to define static_assert in C++ prior the C++11 standard. It might be
broken but a nonstandard C++ compiler might support C11-like _Static_assert
feature. Note that it's fatal for g++ 5.4, but it works for clang++ 3.8.1.

Approved by <joerg>.

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>