{"id":1735,"date":"2009-08-16T23:56:00","date_gmt":"2009-08-16T14:56:00","guid":{"rendered":"https:\/\/hdmr.org\/d\/?e=462"},"modified":"2009-08-16T23:56:00","modified_gmt":"2009-08-16T14:56:00","slug":"blogn-462","status":"publish","type":"post","link":"https:\/\/hdmr.org\/d\/?e=462","title":{"rendered":"typedef\u3060\u3089\u3051\u306estring\u754c\u9688"},"content":{"rendered":"<p>\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u30cb\u30e5\u30fc\u30b9\u3092\u898b\u3066\u3044\u305f\u306e\u3060\u304c\u3048\u3089\u3044\u3053\u3068\u3060\u306a\u3002<br \/>10\u53f7\u5730\u305d\u306e1\u306b\u3042\u308b\u5c55\u793a\u5834\u304c\u3048\u3089\u3044\u3053\u3068\u3060\u3002\u3057\u304b\u3057\u306a\u3093\u3084\u304b\u3093\u3084\u8a00\u3063\u3066\u3084\u3063\u3066\u3057\u307e\u3046\u3093\u3060\u304b\u3089\u3059\u3054\u3044\u3002<br \/>\u305d\u3093\u306a\u4e2d\u4eca\u65e5\u306f\u3001std::string\u3001\u3082\u3068\u3044std::basic_string\u306e\u8aac\u660e\u66f8\u304d\u3092\u30ab\u30ea\u30ab\u30ea\u66f8\u3044\u3066\u3044\u305f\u304c\u307e\u3041\u9577\u3044\u3002<br \/>\u3044\u308d\u3093\u306a\u65b9\u6cd5\u3067\u6587\u5b57\u5217\u3092\u6307\u5b9a\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u308b\u304b\u3089\u3060\u3088\u306a\u3041\u3002<br \/>\u5b9f\u306f\u307e\u3060\u5b8c\u6210\u3057\u3066\u3044\u306a\u3044\u3002\u3057\u304b\u3057\u8ff7\u3044\u3084\u3059\u3044\u3068\u3053\u308d\u3067\u306f\u3042\u308b\u306e\u3067\u5b8c\u6210\u3055\u305b\u306a\u3044\u3068\u306a\u3041\u3002<\/p>\n<hr \/>\n<p>STL\u3068\u304b\u898b\u3066\u308b\u3068typedef\u3060\u3089\u3051\u3002<br \/>typedef\u306b\u3082\u5f79\u306b\u7acb\u3063\u3066\u308btypedef\u3068\u3088\u3046\u308f\u304b\u3089\u306a\u3044typedef\u304c\u3042\u308b\u3002<br \/>\u3053\u3053\u3067\u306fMicrosoft Visual Studio\u306eSTL\u3092\u898b\u3066\u8003\u3048\u3066\u3044\u308b\u304c\u3001\u4ed6\u306eSTL\u3067\u306f\u3069\u3046\u306a\u3093\u3060\u308d\u3002<br \/>\u307e\u3041\u5c11\u306a\u304f\u3068\u3082\u3069\u3053\u3067\u3082\u3042\u308b\u3060\u308d\u3046typedef\u306fstd::string\u3068std::wstring\u306b\u95a2\u308f\u308b\u3082\u306e\u3002<\/p>\n<pre>typedef basic_string&lt;char, char_traits&lt;char>, allocator&lt;char> >  string;<br \/>typedef basic_string&lt;wchar_t, char_traits&lt;wchar_t>,allocator&lt;wchar_t> >  wstring;<\/pre>\n<p>\u5b9f\u306fstd::string\u306fstd::basic_string&lt;char, char_traits&lt;char>, allocator&lt;char> >\u306a\u3093\u3067\u3059\u3002<br \/>\u306a\u3093\u3067\u3053\u3093\u306a\u5c0f\u7d30\u5de5\u3092\u3059\u308b\u306e\u304b\u3068\u3044\u3046\u3068\u30ef\u30a4\u30c9\u6587\u5b57\u5217\u7528\u306estd::wstring\u3068\u5171\u901a\u306b\u3059\u308b\u305f\u3081\u3002<br \/>\u3053\u308c\u306b\u3088\u3063\u30662\u3064\u306e\u6587\u5b57\u5217\u30af\u30e9\u30b9\u3092\u5225\u3005\u306b\u4f5c\u3089\u306a\u304f\u3066\u6e08\u3080\u3002<br \/>\u3060\u304b\u3089\u3068\u3044\u3063\u3066\u3044\u3061\u3044\u3061std::basic_string<char>\u3068\u304b\u66f8\u304f\u306e\u3082\u3081\u3093\u3069\u304f\u3055\u3044\u3002<br \/>\u305d\u3053\u3067typedef\u3068\u3044\u3046\u624b\u6cd5\u3092\u4f7f\u3063\u3066\u3044\u308b\u3002\u307e\u3041\u60aa\u304f\u306a\u3044\u4f8b\u3067\u3059\u3002<br \/>\u3061\u306a\u307f\u306bstd::basic_string\u306fSTL\u306b\u306f\u542b\u307e\u308c\u306a\u3044\u3068\u3044\u3046\u89e3\u91c8\u304c\u4e00\u822c\u7684\u306a\u3088\u3046\u3067\u3059\u3002<br \/>STL\u306f\u30b3\u30f3\u30c6\u30ca\u30fb\u30a4\u30c6\u30ec\u30fc\u30bf\u30fb\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u30fb\u95a2\u6570\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u304b\u3089\u306a\u308b\u3082\u306e\u3067\u3042\u308b\u3068\u8003\u3048\u3089\u308c\u3066\u3044\u308b\u3088\u3046\u3067\u3059\u3002<br \/>\u305d\u3046\u306a\u308b\u3068std::basic_string\u3082\u30b3\u30f3\u30c6\u30ca\u3068\u3057\u3066\u542b\u307e\u308c\u3066\u3082\u3088\u3055\u305d\u3046\u306a\u3082\u306e\u3060\u304c\u3061\u3087\u3063\u3068\u9055\u3046\u3088\u3046\u3067\u3059\u3002<br \/>\u3082\u3063\u3068\u3082STL\u306e\u30b3\u30f3\u30c6\u30ca\u3068\u4e92\u63db\u6027\u306f\u3042\u308b\u306e\u3067STL\u3068\u540c\u69d8\u306b\u4f7f\u3048\u308b\u3068\u8a00\u3048\u305d\u3046\u3067\u3059\u3002<\/p>\n<hr \/>\n<p>\u540c\u69d8\u306b\u5f79\u306b\u7acb\u3064typedef\u306b\u306freverse_iterator\u3068\u304b\u3042\u308a\u307e\u3059\u306d\u3002<\/p>\n<pre>typedef std::reverse_iterator<iterator> reverse_iterator<br \/>typedef std::reverse_iterator<const_iterator> const_reverse_iterator;<\/pre>\n<p>\u3053\u308c\u306f\u5927\u6982\u306e\u30b3\u30f3\u30c6\u30ca\u306b\u3053\u306e\u8a18\u8ff0\u304c\u3042\u308a\u307e\u3059\u3002<br \/>\u5b9f\u306f\u30ea\u30d0\u30fc\u30b9\u30a4\u30c6\u30ec\u30fc\u30bf\u3068\u3044\u3046\u306e\u306f\u57fa\u672c\u306e\u30a4\u30c6\u30ec\u30fc\u30bf\u3092std::reverse_iterator\u307e\u305f\u306fstd::reverse_bidirectional_iterator\u306b\u304b\u3076\u305b\u3066\u4f7f\u3044\u307e\u3059\u3002<br \/>\u3053\u308c\u306b\u3088\u308a++\u3059\u308b\u3068\u524d\u306b\u3059\u3059\u3080\u3068\u304b\u3001\u5185\u90e8\u7684\u306b\u6307\u3057\u3066\u3044\u308b\u8981\u7d20\u306e1\u3064\u524d\u3092\u3055\u3059\u3068\u304b\u3068\u3044\u3046\u7279\u5fb4\u304c\u73fe\u308c\u308b\u3068\u3002<br \/>\u3060\u304b\u3089\u3068\u3044\u3063\u3066\u3044\u3061\u3044\u3061std::reverse_iterator<std::vector<int>::iterator>\u3068\u66f8\u304f\u306e\u306f\u9aa8\u304c\u6298\u308c\u308b\u3002<br \/>\u306a\u306e\u3067std::vector<int>::iterator\u3068\u540c\u3058\u3088\u3046\u306bstd::vector<int>::reverse_iterator\u3067\u6e08\u3080\u3088\u3046\u306b\u3057\u307e\u3057\u3087\u3046\u3068\u3002<br \/>\u3042\u308a\u304c\u305f\u3044\u3053\u3068\u3067\u3059\u3002<br \/>\u3057\u304b\u3057\u610f\u5473\u4e0d\u660e\u306a\u3053\u3068\u3082\u3042\u3063\u3066\u3001std::vector<int>::iterator\u306ftypedef\u3067\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre>typedef _Vector_iterator<_Ty, _Alloc> iterator;<br \/>typedef _Vector_const_iterator<_Ty, _Alloc> const_iterator;<\/pre>\n<p>\u306a\u305c\u304b\u3001\u76f4\u63a5\u30af\u30e9\u30b9\u5b9a\u7fa9\u305b\u305a\u306btypedef\u3057\u3066\u3044\u308b\u3002<br \/>\u5947\u5999\u3067\u3059\u306d\u3002\u307e\u3041_Vector_iterator\u3068\u3044\u3046\u540d\u524d\u304b\u3089\u3057\u3066\u8868\u306b\u306f\u51fa\u306a\u3044\u540d\u524d\u306a\u3093\u3067\u3057\u3087\u3046\u3051\u3069\u3002<br \/>\u3057\u304b\u3057IntelliSense\u306e\u8868\u793a\u306b\u306f\u3053\u306e\u540d\u524d\u3068\u304b\u304c\u51fa\u3066\u304f\u308b\u306e\u3067\u56f0\u308b\u3002<\/p>\n<hr \/>\n<p>IntelliSense\u306b\u60a9\u307e\u3055\u308c\u308b\u3053\u3068\u306f\u591a\u3044\u3067\u3059\u3002<br \/>std::string::npos\u306e\u578b\u540d\u306fconst std::basic_string&lt;char, char_traits&lt;char>, allocator&lt;char> >::size_type\u3060\u3068\u8868\u793a\u3055\u308c\u308b\u3002<br \/>\u5b9f\u306f\u3053\u308c\u306fconst size_t\u3067\u3059\u3002\u3082\u3063\u3068\u3044\u3046\u3068\u591a\u5206const unsigned int\u3067\u3059\u3002<br \/>\u3058\u3083\u3042\u306a\u3093\u3067\u305d\u3046\u8868\u793a\u3057\u306a\u3044\u306e\u304b\u3068\u3044\u3046\u3068\u305d\u308c\u306b\u306f\u8907\u96d1\u306a\u4e8b\u60c5\u304c\u3042\u308a\u307e\u3059\u3002<br \/>std::basic_string&lt;_Elem,_Traits,_Ax>\u306esize_type\u3068\u3044\u3046\u306e\u306ftypedef\u3067\u5b9a\u3081\u3089\u308c\u3066\u3044\u3066\u3001<\/p>\n<pre>typedef typename _Alloc::size_type size_type;<\/pre>\n<p>\u3068\u3042\u308b\u3002\u30a2\u30ed\u30b1\u30fc\u30bf\u306b\u3088\u3063\u3066\u6c7a\u307e\u308b\u3093\u3067\u3059\u3088\u3002<br \/>\u3068\u306f\u3044\u3048std::allocator&lt;char>\u3092\u4f7f\u3046\u306e\u304c\u666e\u901a\u3067\u3059\u304b\u3089\u306d\u3047\u3002<br \/>\u305d\u306e\u5834\u5408\u3069\u3046\u306a\u308b\u306e\u304b\u3068\u3044\u3046\u3068\u30d8\u30c3\u30c0\u30d5\u30a1\u30a4\u30eb\u3001xmemory\u3092\u8aad\u307f\u307e\u3059\u3068\u3001std::allocator<_Ty>\u306b\u304a\u3044\u3066\u3053\u3046typedef\u3055\u308c\u3066\u3044\u308b\u3002<\/p>\n<pre>typedef _SIZT size_type;<\/pre>\n<p>_SIZT\u3063\u3066\u306a\u3093\u3060\u3063\u3066\u3053\u306e\u5148\u982d\u3067size_t\u3068\u6c7a\u3081\u3089\u308c\u3066\u3044\u308b\u3002<br \/>\u666e\u901a\u306e\u30e1\u30e2\u30ea\u3067\u306fsize_t\u3060\u3068\u3044\u3046\u3053\u3068\u306b\u306a\u308b\u308f\u3051\u3060\u3002<br \/>size_t\u3068\u3044\u3046\u306e\u306fC\u3067\u5b9a\u3081\u3089\u308c\u3066\u3044\u308b\u5927\u304d\u3055\u3092\u8868\u3059\u578b\u3067\u3001\u5177\u4f53\u7684\u306b\u306fstddef.h\u3067\u5b9a\u3081\u3089\u308c\u3066\u3044\u308b\u3002\u5b9f\u969b\u306fcrtdefs.h\u306b\u66f8\u3044\u3066\u3042\u308b\u3002<\/p>\n<pre>#ifdef  _WIN64<br \/>typedef unsigned __int64    size_t;<br \/>#else<br \/>typedef _W64 unsigned int   size_t;<br \/>#endif<\/pre>\n<p>64\u30d3\u30c3\u30c8\u7248Windows\u3067\u306funsigned __int64\u306a\u306e\u3067unsigned int\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u304c\u3001\u305d\u3046\u3067\u306a\u3051\u308c\u3070unsigned int\u3067\u3059\u306d\u3002<br \/>\u307e\u3041\u3068\u306f\u3044\u3048\u3053\u3053\u307e\u3067\u958b\u304f\u3068\u4e92\u63db\u6027\u3067\u554f\u984c\u304c\u8d77\u304d\u308b\u306e\u3067size_t\u306b\u3068\u3069\u3081\u308b\u306e\u304c\u666e\u901a\u3002<\/p>\n<hr \/>\n<p>\u3053\u3093\u306a\u306e\u3070\u3063\u304b\u308a\u3067\u3059\u3002<br \/>\u306a\u3093\u3067\u3053\u3093\u306a\u3070\u3063\u304b\u308atypedef\u4f7f\u3046\u3093\u3060\u3063\u3066\u601d\u3048\u3066\u304d\u307e\u3059\u3002<br \/>\u305d\u308a\u3083\u4fbf\u5229\u306atypedef\u3082\u591a\u3044\u3093\u3067\u3059\u304c\u3053\u3053\u307e\u3067\u304f\u308b\u3068\u3069\u3046\u304b\u3057\u3066\u3044\u308b\u3002<br \/>Java\u30fbC#\u3067\u306ftypedef\u304c\u306a\u3044\u3051\u3069\u3001\u540c\u3058\u3082\u306e\u304c2\u3064\u306e\u540d\u524d\u3092\u6301\u3064\u306e\u306f\u8907\u96d1\u3060\u3068\u3044\u3046\u306e\u304c\u7406\u7531\u3089\u3057\u3044\u3002<br \/>\u307e\u3041\u305d\u306e\u4e3b\u5f35\u306b\u306f\u4e00\u7406\u3042\u308b\u308f\u306a\u3002<br \/>\u305d\u3082\u305d\u3082C++\u306e\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u306f\u6feb\u7528\u3057\u3059\u304e\u3067\u3001\u7406\u89e3\u304c\u96e3\u3057\u3044\u3002<br \/>\u30c0\u30c3\u30af\u30bf\u30a4\u30d4\u30f3\u30b0\u306b\u983c\u308a\u3059\u304e\u3066\u3078\u3093\u3066\u3053\u306a\u30a8\u30e9\u30fc\u3067\u8aad\u307f\u306b\u304f\u304b\u3063\u305f\u308a\u306d\u3002<br \/>std::string\u3092std::wstring\u3092\u5171\u901a\u306e\u90e8\u5206\u306f\u5171\u901a\u3067\u7528\u610f\u3057\u3088\u3046\u3068\u3044\u3046\u8a66\u307f\u306f\u3059\u3070\u3089\u3057\u3044\u3068\u601d\u3046\u304c\u3001\u6700\u5f8c\u306btypedef\u306f\u306a\u3044\u3068\u601d\u3046\u3002<\/p>\n<pre>class string : public basic_string&lt;char, char_traits&lt;char>, allocator&lt;char> >{};<br \/>class wstring : public basic_string&lt;wchar_t, char_traits&lt;wchar_t>,allocator&lt;wchar_t> >{};<\/pre>\n<p>\u3053\u3093\u306a\u98a8\u306b\u6700\u5f8c\u306b\u7d99\u627f\u3059\u308c\u3070\u3044\u3044\u3093\u3058\u3083\u306a\u3044\u306e\u3002\u591a\u5206\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u306f\u5404\u81ea\u66f8\u304f\u5fc5\u8981\u304c\u3042\u308b\u3060\u308d\u3046\u304c\u3002<br \/>\u3053\u3046\u3084\u3063\u3066\u7528\u610f\u3057\u305f\u3082\u306e\u3092\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u3066\u84c4\u3048\u3066\u304a\u3051\u3070\u9ad8\u901f\u306b\u30b3\u30f3\u30d1\u30a4\u30eb\u3067\u304d\u305d\u3046\u3002<br \/>\u307e\u3041\u5b9f\u306e\u3068\u3053\u308d\u3069\u3046\u306a\u306e\u304b\u77e5\u3089\u3093\u304c\u6271\u3044\u306b\u304f\u3044\u306a\u3041\u3068\u306f\u601d\u3046\u3068\u3053\u308d\u3060\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u30cb\u30e5\u30fc\u30b9\u3092\u898b\u3066\u3044\u305f\u306e\u3060\u304c\u3048\u3089\u3044\u3053\u3068\u3060\u306a\u300210\u53f7\u5730\u305d\u306e1\u306b\u3042\u308b\u5c55\u793a\u5834\u304c\u3048\u3089\u3044\u3053\u3068\u3060\u3002\u3057\u304b\u3057\u306a\u3093\u3084\u304b\u3093\u3084\u8a00\u3063\u3066\u3084\u3063\u3066\u3057\u307e\u3046\u3093\u3060\u304b\u3089\u3059\u3054\u3044\u3002\u305d\u3093\u306a\u4e2d\u4eca\u65e5\u306f\u3001std::string\u3001\u3082\u3068\u3044std::basic_st [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-1735","post","type-post","status-publish","format-standard","hentry","category-computer"],"_links":{"self":[{"href":"https:\/\/hdmr.org\/d\/index.php?rest_route=\/wp\/v2\/posts\/1735","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hdmr.org\/d\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hdmr.org\/d\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hdmr.org\/d\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hdmr.org\/d\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1735"}],"version-history":[{"count":0,"href":"https:\/\/hdmr.org\/d\/index.php?rest_route=\/wp\/v2\/posts\/1735\/revisions"}],"wp:attachment":[{"href":"https:\/\/hdmr.org\/d\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1735"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hdmr.org\/d\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1735"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hdmr.org\/d\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1735"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}