{"published":"2021-06-24 00:46:41","description":"#include <cstdio> #include <array> int main(void) { constexpr std::array a{1, 2, 3}; for (const auto& e: a) { printf(\"%d\\n\", e); } return 0; } \u3053\u3046\u3044\u3046\u3082\u306e\u3092\u66f8\u3044\u305f\u3068\u3057\u3066\u3001\u3044\u304b\u306b\u3082\u306a\u7b87\u6240\u304c std::array<int, 3> a{1, 2, 3}; \u3067\u3042\u308c\u3070 clang++ -std=c++11 \u304f\u3089\u3044\u3067\u30b3\u30f3\u30d1\u30a4\u30eb\u3067\u304d\u308b\u3002\u304c\u3001\u4e0a\u8a18\u307e\u3067\u304f\u308b\u3068 clang++ -std=c++17 \u4ee5\u4e0a\u3067\u306a\u3044\u3068\u30b3\u30f3\u30d1\u30a4\u30eb\u3067\u304d\u306a\u3044\u3002\u3068\u3044\u3046\u304b\u30fb\u30fb\u30fb\u3053\u308c\u3069\u3046\u3044\u3046\u611f\u3058\u306a\u306e\uff1f\u63a8\u8ad6\u304c\u2026","author_url":"https://blog.hatena.ne.jp/derwind/","type":"rich","height":"190","image_url":null,"provider_url":"https://hatena.blog","version":"1.0","width":"100%","blog_title":"\u3089\u3093\u3060\u3080\u306a\u8a18\u61b6","provider_name":"Hatena Blog","author_name":"derwind","url":"https://randommemory.hatenablog.com/entry/2021/06/24/004641","categories":["C/C++"],"html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Frandommemory.hatenablog.com%2Fentry%2F2021%2F06%2F24%2F004641\" title=\"std::array \u306e\u5f15\u6570\u3092\u7701\u7565\u3057\u3066\u3057\u307e\u3046 - \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>","title":"std::array \u306e\u5f15\u6570\u3092\u7701\u7565\u3057\u3066\u3057\u307e\u3046","blog_url":"https://randommemory.hatenablog.com/"}