{"id":1730,"date":"2011-02-24T15:50:11","date_gmt":"2011-02-24T06:50:11","guid":{"rendered":"http:\/\/pchero21.com\/?p=1730"},"modified":"2011-02-24T15:50:11","modified_gmt":"2011-02-24T06:50:11","slug":"optaccinclude_stdutility-line-99-error-2070-incomplete-type-is-not-allowed","status":"publish","type":"post","link":"http:\/\/pchero21.com\/?p=1730","title":{"rendered":"&#8220;\/opt\/aCC\/include_std\/utility&#8221;, line 99: error #2070: incomplete type is not allowed"},"content":{"rendered":"<p>HP \uc7a5\ube44\uc5d0\uc11c aCC \ub85c \ucef4\ud30c\uc77c\uc744 \ud558\ub358\ub3c4\uc911 \uc544\ub798\uc758 \uc5d0\ub7ec\uac00 \ubc1c\uc0dd\ud588\ub2e4.<\/p>\n<blockquote><p>&#8220;\/opt\/aCC\/include_std\/utility&#8221;, line 99: error #2070: incomplete type is not<br \/>\nallowed<br \/>\nfirst_type\u00a0 first;<br \/>\n^<br \/>\ndetected during:<br \/>\ninstantiation of class &#8220;std::pair&lt;_TypeT, _TypeU&gt; [with<br \/>\n_TypeT=const std::string, _TypeU=char *]&#8221; at line 97 of<br \/>\n&#8220;\/opt\/aCC\/include_std\/rw\/tree&#8221;<br \/>\ninstantiation of class &#8220;__rw::__rw_rb_tree_node&lt;_Alloc, _Val,<br \/>\n_Key, _KeyOf&gt; [with<br \/>\n_Alloc=std::allocator&lt;std::pair&lt;const std::string, char<br \/>\n*&gt;&gt;, _Val=std::pair&lt;const std::string, char *&gt;,<br \/>\n_Key=std::string,<br \/>\n_KeyOf=__rw::__select1st&lt;std::pair&lt;const std::string,<br \/>\nchar *&gt;, std::string&gt;]&#8221; at line 282 of<br \/>\n&#8220;\/opt\/aCC\/include_std\/rw\/tree&#8221;<br \/>\ninstantiation of class &#8220;__rw::__rb_tree&lt;_Key, _Val, _KeyOf, _Comp,<br \/>\n_Alloc&gt; [with _Key=std::string, _Val=std::pair&lt;const<br \/>\nstd::string, char *&gt;,<br \/>\n_KeyOf=__rw::__select1st&lt;std::pair&lt;const std::string,<br \/>\nchar *&gt;, std::string&gt;, _Comp=std::less&lt;std::string&gt;,<br \/>\n_Alloc=std::allocator&lt;std::pair&lt;const std::string, char<br \/>\n*&gt;&gt;]&#8221; at line 102 of &#8220;\/opt\/aCC\/include_std\/map&#8221;<br \/>\ninstantiation of class &#8220;std::map&lt;_Key, _TypeT, _Compare,<br \/>\n_Allocator&gt; [with _Key=std::string, _TypeT=char *,<br \/>\n_Compare=std::less&lt;std::string&gt;,<br \/>\n_Allocator=std::allocator&lt;std::pair&lt;const std::string,<br \/>\nchar *&gt;&gt;]&#8221; at line 54 of &#8220;LocalRepository.h&#8221;<\/p><\/blockquote>\n<p>\uc774\uc720\uc778\uc989, HP \ucef4\ud30c\uc77c\ub7ec aCC \uac00 \ubc84\uc804 6\ub85c \ub118\uc5b4\uc624\uba74\uc11c \uae30\uc874(aCC version 5)\uc5d0\uc11c \ud5c8\uc6a9\ud588\ub358 C++ \ud0c0\uc785\uc5d0 \ub300\ud55c \ucc98\ub9ac\ub97c \ub354\uc774\uc0c1 \ud5c8\uc6a9\ud558\uc9c0 \uc54a\uc73c\uba74\uc11c \ubc1c\uc0dd\ud55c \ubb38\uc81c\uc600\ub2e4.<\/p>\n<blockquote><p><a href=\"http:\/\/h21007.www2.hp.com\/portal\/site\/dspp\/menuitem.863c3e4cbcdc3f3515b49c108973a801\/?ciid=2708d7c682f02110d7c682f02110275d6e10RCRD#_iso-39._acc6_detects_instantiation_\" target=\"_blank\">\uad00\ub828\ub9c1\ud06c : http:\/\/h21007.www2.hp.com\/portal\/site\/dspp\/menuitem.863c3e4cbcdc3f3515b49c108973a801\/?ciid=2708d7c682f02110d7c682f02110275d6e10RCRD#_iso-39._acc6_detects_instantiation_<\/a><\/p><\/blockquote>\n<p>\uacf5\uc2dd \ubb38\uc11c\ub0b4\uc6a9\uc740 \ub2e4\uc74c\uacfc \uac19\ub2e4.<\/p>\n<blockquote>\n<table style=\"height: 45px;\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"560\">\n<tbody>\n<tr>\n<td align=\"left\" valign=\"top\">\n<h3>ISO-39. aCC6 detects instantiation conflicts earlier (2403)<\/h3>\n<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<\/tr>\n<tr>\n<td><img loading=\"lazy\" src=\"http:\/\/welcome.hp-ww.com\/img\/s.gif\" alt=\"\" width=\"1\" height=\"5\" \/><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Points of instantiation differ for member functions, so reporting of  instantiation conflicts can differ. This is simply a behavior  difference, and not a compatibility issue. However, the following code  snippet illustrates an incompatibility in the use of repeated <tt>const<\/tt> keywords, which aCC5 allows and aCC6 does not. To fix this code, don&#8217;t instantiate the template with a <tt>const int<\/tt>; simply use <tt>int<\/tt>:<\/p>\n<pre>template &lt;class T&gt;\nstruct S {\nvoid foo(T *i) {}\nvoid foo(const T *i) {}\n};\nint main() {\nint i = 5;\n#ifdef WORKS_IN_BOTH\nS&lt;int&gt; s;\n#else\nS&lt;const int&gt; s;\n#endif\nreturn 0;\n}\n<\/pre>\n<\/blockquote>\n<p>\ub0b4\uc6a9\uc778\uc989, C++ \uc5d0\uc11c template \uc0ac\uc6a9\uc2dc const \ub97c \uc0ac\uc6a9\ud558\uc9c0 \ub9d0\ub77c\ub294 \ub73b\uc774\ub2e4.<\/p>\n<p>\uc704\uc758 \uc5d0\ub7ec\uc5d0\uc11c \ubb38\uc81c\uac00 \ud574\ub2f9 \ub77c\uc778(line 54 of &#8220;LocalRepository.h&#8221;)\uc744 \ucc3e\uc544\uac00\ubcf4\ub2c8 \uc544\ub798\uc640 \uac19\uc774 \uc120\uc5b8\ub418\uc788\uc5c8\ub2e4.<\/p>\n<blockquote><p>map&lt;string, char*&gt; m_mapStringMainData;<\/p><\/blockquote>\n<p>\ubb54\uac00 \uc774\uc0c1\ud588\ub2e4. map \uc120\uc5b8 \uc911, \uc5b4\ub514\uc5d0\ub3c4 const \ub294 \uc788\uc9c0 \uc54a\uc558\ub2e4. \uc5b4\ucc0c\ub41c \uc77c\uc77c\uae4c.<\/p>\n<p>\ud55c\ucc38\uc744 \ud5e4\ub9e4\uace0 \uc8fc\uc704\uc5d0 \ub3c4\uc6c0\uc744 \uad6c\ud574\uc11c \ucc3e\uc544\ub0b8 \uc815\ub2f5\uc740 \uc815\ub9d0 \uc5c9\ub6b1\ud55c \uacf3\uc5d0 \uc788\uc5c8\ub2e4.<br \/>\n\ubc14\ub85c iostream \uc600\ub2e4.<\/p>\n<p>\ub2e4\uc74c\uc758 \ub77c\uc778\uc744 \ucd94\uac00\ud558\uc5ec \uae54\ub054\ud788 \ubb38\uc81c\ub97c \ud574\uacb0\ud560 \uc218 \uc788\uc5c8\ub2e4.<\/p>\n<blockquote><p>#include &lt;iostream&gt;<\/p><\/blockquote>\n<p>\uc65c \uc774\ub7f0 \ubb38\uc81c\uac00 \uc0dd\uae34 \uac83\uc77c\uae4c? \uc870\uae08 \ub354 \uc9c8\ubb38\uc744 \ud574\ubcf8 \uacb0\uacfc \ud55c\uac00\uc9c0 \uc7ac\ubbf8\uc788\ub294 \uc0ac\uc2e4\uc744 \uc54c \uc218 \uc788\uc5c8\ub2e4.<br \/>\n\uc774\uc804 \ubc84\uc804\uc758 aCC \uc5d0\uc11c\ub294 iostream \uc744 include \ud558\uba74 \ub610 \uc548\ub41c\ub2e4\ub294 \uac83..<\/p>\n<p>\uc544\uc9c1 \ubc30\uc6cc\uc57c\ud560 \uac83\uc774 \ub9ce\ub2e4..<\/p>\n","protected":false},"excerpt":{"rendered":"<p>HP \uc7a5\ube44\uc5d0\uc11c aCC \ub85c \ucef4\ud30c\uc77c\uc744 \ud558\ub358\ub3c4\uc911 \uc544\ub798\uc758 \uc5d0\ub7ec\uac00 \ubc1c\uc0dd\ud588\ub2e4. &#8220;\/opt\/aCC\/include_std\/utility&#8221;, line 99: error #2070: incomplete type is not allowed first_type\u00a0 first; ^ detected during: instantiation of class &#8220;std::pair&lt;_TypeT, _TypeU&gt; [with _TypeT=const std::string, _TypeU=char *]&#8221; at line 97 of &#8220;\/opt\/aCC\/include_std\/rw\/tree&#8221; instantiation &hellip; <a href=\"http:\/\/pchero21.com\/?p=1730\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[16],"tags":[86,136,166,215],"_links":{"self":[{"href":"http:\/\/pchero21.com\/index.php?rest_route=\/wp\/v2\/posts\/1730"}],"collection":[{"href":"http:\/\/pchero21.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/pchero21.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/pchero21.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/pchero21.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1730"}],"version-history":[{"count":0,"href":"http:\/\/pchero21.com\/index.php?rest_route=\/wp\/v2\/posts\/1730\/revisions"}],"wp:attachment":[{"href":"http:\/\/pchero21.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1730"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/pchero21.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1730"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/pchero21.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1730"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}