{"type":"rich","version":"1.0","title":"constexpr","provider_name":"Hatena Blog","height":"190","author_url":"https://blog.hatena.ne.jp/derwind/","url":"https://randommemory.hatenablog.com/entry/2017/02/04/201510","description":"#include <cstdio> constexpr int num(int a = 1) { if ( a == 1 ) { return 314; } else { return 271; } } int main(void) { char buf[ num(1) ]; printf(\"%lu\\n\", sizeof(buf)); return 0; } \u3053\u3093\u306a\u306e\u66f8\u3044\u3066\u3001 $ clang++ -O3 -S -o main.s -std=c++14 main.cpp \u3057\u3066\u307f\u308b\u3068\u3001 .section __TEXT,__text,regular,pure_instructions .macosx\u2026","categories":["C/C++"],"image_url":null,"html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Frandommemory.hatenablog.com%2Fentry%2F2017%2F02%2F04%2F201510\" title=\"constexpr - \u3089\u3093\u3060\u3080\u306a\u8a18\u61b6\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","blog_title":"\u3089\u3093\u3060\u3080\u306a\u8a18\u61b6","provider_url":"https://hatena.blog","width":"100%","published":"2017-02-04 20:15:10","blog_url":"https://randommemory.hatenablog.com/","author_name":"derwind"}