{"published":"2023-12-06 00:00:00","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fyohhoy.hatenadiary.jp%2Fentry%2F20231206%2Fp1\" title=\"NEO assert\u30de\u30af\u30ed - yohhoy\u306e\u65e5\u8a18\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","description":"\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9eC/C++\u306e\u6b21\u671f\u6a19\u6e96\u898f\u683cC2x(C23)\u304a\u3088\u3073C++2c(C++26)\u3067\u306f\u3001\u30a2\u30b5\u30fc\u30b7\u30e7\u30f3\u30de\u30af\u30edassert\u306e\u6539\u5584\u304c\u884c\u308f\u308c\u308b\u3002 #include <assert.h> // C/C++ #include <cassert> // C++\u306e\u307f int is_valid(int); assert( \"42 shall be vaild\", is_valid(42) ); // NG: C17/C++20\u73fe\u5728 // OK: C2x/C++2c\u4ee5\u964d assert((\"42 shall be vaild\", is_valid(42))); // OK: \u5f0f\u5168\u4f53\u3092\u62ec\u5f27\u3067\u56f2\u3046 C\u8a00\u8a9e\u3067\u306f\u30c8\u30e9\u2026","url":"https://yohhoy.hatenadiary.jp/entry/20231206/p1","author_name":"yohhoy","version":"1.0","type":"rich","blog_title":"yohhoy\u306e\u65e5\u8a18","provider_url":"https://hatena.blog","author_url":"https://blog.hatena.ne.jp/yohhoy/","width":"100%","categories":["C","C++","C2x","C++2c"],"height":"190","provider_name":"Hatena Blog","image_url":null,"title":"NEO assert\u30de\u30af\u30ed","blog_url":"https://yohhoy.hatenadiary.jp/"}