{"provider_name":"Hatena Blog","author_name":"lpha_z","author_url":"https://blog.hatena.ne.jp/lpha_z/","description":"g++-8\u3067\u8ffd\u52a0\u3055\u308c\u305f-Wclass-memaccess\u306e\u8b66\u544a\u3092\u6709\u52b9\u306b\u3057\u3066\u3044\u308b\u5834\u5408\u3001\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u306f\u30b3\u30f3\u30d1\u30a4\u30eb\u6642\u306b\u8b66\u544a\u304c\u51fa\u307e\u3059\u3002-Wclass-memaccess\u306e\u8b66\u544a\u306f\u3001-Wall\u306b\u542b\u307e\u308c\u308b\u305f\u3081\u3001\u5358\u306b\u30b3\u30f3\u30d1\u30a4\u30e9\u3092g++-8\u306b\u5909\u66f4\u3057\u305f\u3060\u3051\u3067\u3053\u306e\u8b66\u544a\u306b\u51fa\u304f\u308f\u3059\u3053\u3068\u3082\u3042\u308b\u3068\u601d\u3044\u307e\u3059\u3002 #include <utility> #include <cstring> std::pair<double, double> p, q; int main() { ::memcpy(&q,&p,sizeof q); } \u3053\u308c\u306f\u3001\u3069\u306e\u3088\u3046\u306a\u8b66\u544a\u304b\u3068\u3044\u3046\u3068\u3001\u300cstd::pair<T, U>\u306b\u306f\u975e\u81ea\u660e\u306a\u30b3\u30d4\u30fc\u4ee3\u5165\u6f14\u7b97\u5b50\u304c\u3042\u2026","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Flpha-z.hatenablog.com%2Fentry%2F2018%2F09%2F23%2F231500\" title=\"std::pair\u3092memcpy\u3059\u308b\u3053\u3068\u306b\u3064\u3044\u3066 - \u3088\u30fc\u308b\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","provider_url":"https://hatena.blog","height":"190","type":"rich","url":"https://lpha-z.hatenablog.com/entry/2018/09/23/231500","published":"2018-09-23 23:15:00","width":"100%","version":"1.0","title":"std::pair\u3092memcpy\u3059\u308b\u3053\u3068\u306b\u3064\u3044\u3066","blog_title":"\u3088\u30fc\u308b","blog_url":"https://lpha-z.hatenablog.com/","image_url":null,"categories":[]}