{"provider_url":"https://hatena.blog","author_name":"yohhoy","url":"https://yohhoy.hatenadiary.jp/entry/20220112/p1","version":"1.0","categories":["C++"],"width":"100%","author_url":"https://blog.hatena.ne.jp/yohhoy/","description":"C++\u6a19\u6e96\u30e9\u30a4\u30d6\u30e9\u30eastd::min, std::max\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u306e\u52d5\u4f5c\u4ed5\u69d8\u306b\u3064\u3044\u3066\u30e1\u30e2\u3002 \u554f\u984c\uff1aC++ min/max\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u3092\u300c\u6b63\u3057\u304f\u300d\u5b9f\u88c5\u305b\u3088\u3002 template <typename T> const T& min(const T& a, const T& b) { // \u3069\u3061\u3089\u306emin\u5b9f\u88c5\u304c\u6b63\u3057\u3044\uff1f return a < b ? a : b; // #1 return b < a ? b : a; // #2 } template <typename T> const T& max(const T& a, const T& b) { // \u3069\u3061\u3089\u306emax\u5b9f\u88c5\u304c\u6b63\u3057\u3044\uff1f retur\u2026","published":"2022-01-12 00:00:00","title":"C++ min/max\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u306e\u6b63\u3057\u3044\u5b9f\u88c5","blog_title":"yohhoy\u306e\u65e5\u8a18","blog_url":"https://yohhoy.hatenadiary.jp/","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fyohhoy.hatenadiary.jp%2Fentry%2F20220112%2Fp1\" title=\"C++ min/max\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u306e\u6b63\u3057\u3044\u5b9f\u88c5 - 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>","provider_name":"Hatena Blog","height":"190","image_url":null,"type":"rich"}