éã«ãã³ãŒãå ã®å°ããªïŒæãåãã«è¶³ããªãïŒèŠåãé²æ¢ãããã®ã³ãŒãã®äœæè ãåŠçœ°ããïŒãããããŒããã¬ã©ã³ã¹ïŒç©æ¥µçãªäœæ¥ã«ãããäžè¬çãªèŠåã«å¯Ÿããäžå¯å®¹ã®é°å²æ°ãçãŸããå°ããªèŠåãé²æ¢ãã掻åã«ãããéäžã§ããã¬ãŒãã³ã°ãããŠå€§å¹ ã«å¶éããããšãã§ããŸãéåžžã¯ããŒã ã®ã«ãŒã«ãç¡èŠããç¹°ãè¿ãç¯äººã®å¯èœæ§ã
Visual Studio 2017 15.6 Preview 1ã®äºåããŒãžã§ã³ã¯ãéçºè ã«ã³ãŒãã®å質ãæ¹åããèŠåãã¯ãªã¢ããããŒã«ãæäŸããŸãã
åé¡ã®èª¬æ
åè«ã¯ããŠããããã¹ãŠã®èŠåãåãããã«äœæãããããã§ã¯ãªãããšã«æ³šæããŠãã ããã
- äžéšã¯æ£ç¢ºã§ã
- ãã®ä»-å¹çå¥
- ãã®ä»-é¢é£æ§
- 4-é«éæ€åº
- 5çªç®-æ¢åã®ã³ãŒãããŒã¹ãžã®åœ±é¿ãå°ãªã
æ®å¿µãªããã5ã€ã®ç¹åŸŽãã¹ãŠãäžåºŠã«æã£ãŠããèŠåã¯1ã€ã§ã¯ãããŸããã 蚺æã¯ãããããŸãã¯ãã®ãªã¹ãã®æ©èœãçµã¿åããããã®ã§ãããããã°ã©ããŒã«éç¥ããå¿ èŠãããåé¡ãšããã§ãªãåé¡ã«ã€ããŠç¡éã®è°è«ãåŒãèµ·ãããŸãã ãã¡ãããç°ãªãéçºããŒã ã¯ç°ãªãåºæºã䜿çšããã³ã³ãã€ã©éçºè ã¯èšºæã®æ¡åŒµãããåé¡ãäœæããŠãããããã¹ãŠã®åºæºã«å¯Ÿå¿ããããšããŸãã ClangãšGCCã¯ã¢ã©ãŒããã°ã«ãŒãåããããšã§ã¢ã©ãŒãããã现ããåºå¥ããããšããŸãããMSVCã¯ã¢ã©ãŒãã®éèŠåºŠã¬ãã«ã®ããç²éãªåé¢ã䜿çšããŸãã
蚺ææ¹å調æ»ã§ã¯ã270人ã®åçè ã®15ïŒ ã/ Wall / WXããŒã䜿çšããŠã³ãŒããåéããèŠåã«å¯Ÿããèæ§ããŒãã§ããããšã瀺ããŠããŸãã å¥ã®12ïŒ ã¯ã / W4ã¬ãã«ã«å ããŠããã©ã«ãã§ãã¹ãŠã®èŠåããªãã«ãªã£ãŠãã/ Wallãªãã·ã§ã³ã䜿çšããŠã¢ã»ã³ããªãéå§ãããšåçããŸããã ããã«30ïŒ ã/ W4ã¬ãã«ã§ã³ãŒããåéããŸãã ããã3ã€ã®äºãã«çŽ ãªã°ã«ãŒãã¯ãVisual StudioïŒã¬ãã«/ W3 ïŒãŸãã¯ã³ã³ãã€ã©ãŒïŒã¬ãã«/ W1 ïŒã®ããã©ã«ãèšå®ãããå³ããã³ãŒãå質ãæã€ãŠãŒã¶ãŒã®57ïŒ ãæ§æããŸãã ã¬ãã«ããšã®èŠåã®åé¢ã¯ããçšåºŠä»»æã§ãããç§ãã¡èªèº«ã®ã¢ãããŒãã決ããŠåæ ããŠããŸããã ããšãã°ãMSVCã©ã€ãã©ãªããŒã ã¯ã / W4ã¬ãã«ã§ã®ã³ãŒãã®ã¯ãªãŒã³ã¢ããã«åãçµãã§ããŸãã
éçºè ãã©ã®ãããªèŠåã®ã»ãããèŠãã¹ããã«ã€ããŠã®ã³ã³ã»ã³ãµã¹ã¯ãããŸããããç¹å®ã®ãããžã§ã¯ãã§ã©ã®ãããªã»ãããæ¡çšããŠããæåŸã«ã¢ã¯ãã£ããªèŠåãæ®ã£ãŠã¯ãªããªãããšã«å šå¡ãåæããŸãããŸãã¯æå¶ãããŸãã äžæ¹ã§ããã®ã¢ãããŒãã§ã¯ãåæ°ããèŠåã¯æªåé«ããŠã§ãŒããŒ-ãã§ã¯ããŒã®æ³å ãšåºå¥ããããã®ãããå€ãšããŠæ©èœããäžæ¹ã§ãããã¯ã¯ãã¹ãã©ãããã©ãŒã ã³ãŒãã§å¿ èŠã§ããåããã©ãããã©ãŒã /ã³ã³ãã€ã©ã§ãã®ãããªã³ãŒãã«å¯ŸããŠçºè¡ãããèŠåã¯ãã°ãã°ãã§ã«ç¹°ãè¿ãå ±åãããŠãããšã©ãŒãå¥ã®é倧ãªé害ã èŠåã«å¯ŸãããŒããã¬ã©ã³ã¹ã¯ãå éšã³ãŒãã«é¢ããŠç°¡åã«æã蟌ãããšãã§ããŸããããµãŒãããŒãã£ã©ã€ãã©ãªã®å€éšã³ãŒãã«é¢ããŠã¯ã»ãšãã©äžå¯èœã§ãããã®äœæè ã¯ãçºè¡ããã/é€å€ãããèŠåã®ç°ãªãã»ããã䜿çšã§ããŸãã ãã¹ãŠã®ã©ã€ãã©ãªããæ¢ç¥ã®èŠåããã¹ãŠã¯ãªã¢ãããšããèŠä»¶ã¯ãéçŸå®çã§ããïŒèª€æ€ç¥ãšããããæå¶ããããã®æšæºçãªèšé²åœ¢åŒããªãããïŒãå°éäžèœã§ãïŒå€ãã®èŠåã絶ããæ¡å€§ããŠããããïŒã 2ã€ç®ã¯ãã³ã³ãã€ã©ãšã©ã€ãã©ãªã®ãšã³ã·ã¹ãã ãäžç·ã«éçºãããŠãããšããäºå®ãšãäžéšã®æ¹åã«ã¯æ¹åãå¿ èŠãªãããäžå®ã®ããŒã¹ãç¶æããå¿ èŠãããããã§ãã ãã®çµæãéçºè ã¯ãã©ã€ãã©ãªã®èåŸã«ããã³ã³ãã€ã©ãŒããŸãã¯ã³ã³ãã€ã©ãŒã®èåŸã«ããã©ã€ãã©ãªãŒã®ãããããåŠçããå¿ èŠããããŸããã©ã¡ããããããã«ãã£ãŠå¶åŸ¡ãããŸããã ãã®ãããªç¶æ³ã§ã¯ãããã°ã©ããŒïŒC ++ã®ãããªã©ã€ãèšèªããã³ã¢ã¯ãã£ãèšèªã§äœæããå ŽåïŒã¯ãèªåãå¶åŸ¡ããªãã³ãŒãã§ã©ã®èŠåãèŠããããèªåã§æ±ºå®ããããšèããŠããŸãã
ææ¡ããããœãªã¥ãŒã·ã§ã³
ã³ã³ãã€ã«ãªãã·ã§ã³ã®æ°ããã°ã«ãŒã/ externalïŒ*ãå°å ¥ããŸããããã¯ããå€éšãããããŒãã¡ã€ã«ã§æ©èœããŸãã æ¢åã®ãµãŒãããŒãã£ã©ã€ãã©ãªã®å€æ§æ§ãããããåæ ãããããä»ã®ã³ã³ãã€ã©ã§æ¡çšãããŠããã ã·ã¹ãã ããããŒãã¡ã€ã« ããšããååããã å€éšããããŒãã¡ã€ã« ããšããååãåªå ããŸããã ããã«ãC ++æšæºã¯[lex.header]ã»ã¯ã·ã§ã³ã®å€éšããããŒãã¡ã€ã«ã«æ¢ã«ã¢ããŒã«ããŠãããããç§ãã¡ã®éžæã¯éåžžã«èªç¶ã§ãã ãŠãŒã¶ãŒããããããã¹ã¿ãŒããã®ãç°¡åã«ãªããããæ°ããããŒãåå¥ã«èª¬æããã®ã§ã¯ãªãã°ã«ãŒãã«çµåããŸãããæ°ããããŒã®å®å šãªæ§æã¯ãæ¢ç¥ã®ããŒãšã®é¡æšã«ãã£ãŠäºæž¬ã§ããŸãã çŸæç¹ã§ã¯ãã°ã«ãŒãã¯5ã€ã®ãã©ã¡ãŒã¿ãŒã§æ§æããã2ã€ã®ã«ããŽãªãŒã«åããããŠããŸãïŒä»¥äžã®é¢é£ã»ã¯ã·ã§ã³ãåç §ïŒã
å€éšããããŒãã¡ã€ã«ã®ã»ãããå®çŸ©ãããã©ã¡ãŒã¿ãŒ
- /å€éšïŒI <ãã¹>
- /å€éšïŒå±±æ¬åŒ§
- /å€éšïŒenvïŒ<var>
å€éšããããŒãã¡ã€ã«ã®èšºæåäœãå®çŸ©ãããã©ã¡ãŒã¿ãŒ
- /å€éšïŒW <n>
- /å€éšïŒãã³ãã¬ãŒã-
2çªç®ã®ã°ã«ãŒãã«ã¯ã / externalïŒwã/ externalïŒWallã/ externalïŒWvïŒ<version>ã/ externalïŒWX [-]ã/ externalïŒw <n> <warning>ã/ãªã©ã®ãã©ã¡ãŒã¿ãŒãè¿œå ã§ããŸãã externalïŒwd <warning>ã/ externalïŒwe <warning>ã/ externalïŒwo <warning>ãªã© ãããã¯èŠåã¬ãã«ã®é¡äŒŒç©ãšããŠããŸãã¯å€éšïŒã«ã¹ã¿ã ã§ã¯ãªãïŒããããŒãã¡ã€ã«ã®æšæºããŒãšããŠäœ¿çšã§ããŸãã ããã¯å®éšçãªæ©èœã§ãããããæå¹ã«ããã«ã¯ãæåŸãŸã§ãããã°ãããŸã§/ ExperimentalïŒexternalãªãã·ã§ã³ãè¿œå ããå¿ èŠããããŸãã æ°ããããŒã®æ©èœãèŠãŠã¿ãŸãããã
å€éšããããŒãã¡ã€ã«
çŸåšãã©ã€ãã©ãªã®äœæè ãšãŠãŒã¶ãŒã¯ãããããŒãã¡ã€ã«ã®å Žæã4ã€ã®æ¹æ³ã§æå®ã§ããŸããã¢ã»ã³ããªã¹ã¯ãªãããžã®è¿œå ã®è€éããåã蟌ã¿å¯èœæ§ãããã³å¶åŸ¡ã®çšåºŠãç°ãªããŸãã
- / externalïŒI <path> -GCCãClangãããã³EDGã³ã³ãã€ã©ãŒã®-isystemãŸãã¯åã«-iïŒå°æåïŒã®ã€ããªãã®ãŒçé¡äŒŒç©ãå€éšããããŒãã¡ã€ã«ãå«ããã£ã¬ã¯ããªãèšå®ãããŸãã ãã¹å ã®ãã¹ãŠã®ååž°ãµããã£ã¬ã¯ããªãå€éšãšèŠãªãããŸãããå«ãŸãããã¡ã€ã«ãæ€çŽ¢ãããã£ã¬ã¯ããªã®ãªã¹ãã«è¿œå ãããã®ã¯ãã¹ã®ã¿ã§ãã
- / externalïŒenvïŒ<var> -ã»ãã³ãã³ã§åºåãããå€éšããããŒãã¡ã€ã«ããããã£ã¬ã¯ããªã®ãªã¹ããä¿åãããç°å¢å€æ°ã®ååãèšå®ããŸãã ãã®ã¡ãœããã¯ãINCLUDEãCAExcludePathãªã©ã®ç°å¢å€æ°ã«äŸåãããã«ãã·ã¹ãã ã䜿çšããå Žåã«åœ¹ç«ã¡ãŸãããããã®ç°å¢å€æ°ã¯ã / includeã¹ã€ããã§ãã§ãã¯ããå¿ èŠã®ãªãå€éšã€ã³ã¯ã«ãŒããã¡ã€ã«ãšãã¡ã€ã«ã®ãªã¹ããããããèšå®ããŸãã ãŠãŒã¶ãŒã¯ãåçŽã«/ externalïŒenvïŒINCLUDEããã³/ externalïŒenvïŒCAExcludePathãèšè¿°ã§ãã / externalïŒIãªãã·ã§ã³ã䜿çšããŠãã£ã¬ã¯ããªã®é·ããªã¹ããæž¡ãããšã¯ã§ããŸããã
- / externalïŒå±±æ¬åŒ§ - #include <>ã³ãã³ãïŒ #include ""ã§ã¯ãªã ïŒã§ã€ã³ã¯ã«ãŒãããããã¹ãŠã®ããããŒãã¡ã€ã«ãå€éšãšããŠè§£éã§ããŸãã
- #pragma system_header-ããããŒãã¡ã€ã«ã®åã蟌ã¿ã©ãã«-ã©ã€ãã©ãªäœæè ã¯ãç¹å®ã®ããããŒãã¡ã€ã«ãå€éšãšããŠããŒã¯ã§ããŸãã
å€éšããããŒãã¡ã€ã«ã®èŠåã¬ãã«
/ externalïŒW <n>ãªãã·ã§ã³ã«ããããŠãŒã¶ãŒã¯å€éšããããŒãã¡ã€ã«ã®ããã©ã«ãã®èŠåã¬ãã«ãèšå®ã§ããŸãã ãã®ãããªå å«ç©ãèšèšã®é¡äŒŒç©ã§ã©ããããŸãã
#pragma warning (push, n) // n #pragma warning (pop)
ãã®ããŒãšå€éšããããŒãã¡ã€ã«ãæå®ããåªå æ¹æ³ãçµã¿åãããŠäœ¿çšââãããšããããã®ãã¡ã€ã«ã«å¯ŸããŠçºè¡ãããèŠåãå®å šã«ãªãã«ã§ããŸãã
äŸïŒ
å€éšããããŒãã¡ã€ã«ïŒsome_lib_dir / some_hdr.hpp
template <typename T> struct some_struct { static const T value = -7; // W4: warning C4245: 'initializing': // conversion from 'int' to // 'unsigned int', signed/unsigned // mismatch };
ãŠãŒã¶ãŒã³ãŒãïŒmy_prog.cpp
#include "some_hdr.hpp" int main() { return some_struct<unsigned int>().value; }
ãã®ã³ãŒãã次ã®ããã«ã³ã³ãã€ã«ããå ŽåïŒ
cl.exe / I some_lib_dir / W4 my_prog.cpp
ã³ã¡ã³ãã«èšèŒãããŠãã第4ã¬ãã«ã®èŠåã¡ãã»ãŒãžC4245ãããããŒãã¡ã€ã«ã«çºè¡ãããŸãã ãã©ã¡ãŒã¿ãŒã䜿çšããã³ã³ãã€ã«ïŒ
cl.exe /å®éšçïŒå€éš/å€éšïŒW0 / I some_lib_dir / W4 my_prog.cpp
å€éšããããŒãã¡ã€ã«ãæå®ããªãã£ããããå¹æã¯ãããŸããã ãã©ã¡ãŒã¿ãŒã䜿çšããã³ã³ãã€ã«ïŒ
cl.exe /å®éšçïŒå€éš/å€éšïŒI some_lib_dir / W4 my_prog.cpp
ãŸããå€éšããããŒãã¡ã€ã«ã®èŠåã¬ãã«ãèšå®ãããŠããããããã©ã«ãã§/ Wãã©ã¡ãŒã¿ã§æå®ãããã¬ãã«ã«å¯Ÿå¿ããŠããããïŒãã®å Žåã¯4ïŒãå¹æã¯ãããŸããã å€éšããããŒãã¡ã€ã«ã®èŠåãæå¶ããã«ã¯ããããã®ãã¡ã€ã«ãžã®ãã¹ãšãããã®èŠåã®ã¬ãã«ã®äž¡æ¹ãæå®ããå¿ èŠããããŸãã
cl.exe /å®éšçïŒå€éš/å€éšïŒI some_lib_dir /å€éšïŒW0 / W4 my_prog.cpp
ãã®ã³ãã³ãã䜿çšãããšãsome_hdr.hppãã¡ã€ã«ã®ãã¹ãŠã®èŠåãåãé€ããmy_prog.cppãã¡ã€ã«ã®èŠåã®ã¿ãæ®ãããšãã§ããŸãã
å éšã³ãŒããšå€éšã³ãŒãã®äž¡æ¹ã«åœ±é¿ããèŠå
å€éšããããŒãã¡ã€ã«ã®ã¢ã©ãŒãã¬ãã«ãèšå®ããããšãã§ããã°çŽ æŽããããšæããŸãããå éšãŠãŒã¶ãŒãã¡ã€ã«ã«ãé¢é£ããäžéšã®ã¡ãã»ãŒãžãé€å€ãããªã¹ã¯ããããŸãã includeãšãšãã«push / popãã©ã°ããã£ã¬ã¯ãã£ãã®ã¿ã䜿çšãããšããŠãŒã¶ãŒã³ãŒãã§ãã³ãã¬ãŒããã€ã³ã¹ã¿ã³ã¹åããéã«å€ãã®æçšãªèŠåãæ¶ããŸãã ãã®ãããªèŠåã¯ããŠãŒã¶ãŒåŽã®åé¡ã®ååšã瀺ããŠããå¯èœæ§ãããããã³ãã¬ãŒãå ã®ç¹å®ã®åã®ã¿ã眮æããå Žåã«æ瀺ãããŸãïŒããšãã°ã<type_traits>ããconstãŸãã¯ïŒãåé€ããåå€æã䜿çšããã®ãå¿ããå ŽåïŒããã®åé¡ãå ±åããå¿ èŠããããŸãã ãã®ããŒãžã§ã³ããåã¯ãã¡ãã»ãŒãžãçºè¡ãããæç¹ã§ã®èŠåã¬ãã«ã¯èªåœåæã®ââã¿ã«åºã¥ããŠæ±ºå®ãããŠããŸããããåé¡é åã¯å¥ã®ç¯å²ã«ããå¯èœæ§ããããŸãã ã©ãããããã³ãã¬ãŒãã®ã€ã³ã¹ã¿ã³ã¹åãã€ã³ãã§èŠåã¬ãã«ãæ¯èŒããŠãã©ã®èŠåãçºè¡ããã¹ãããã©ã®èŠåãçºè¡ãã¹ãã§ãªãããå€æããããšã¯çã«ããªã£ãŠããŸãã
å®çŸ©ãå€éšããããŒãã¡ã€ã«ã«ãããã³ãã¬ãŒãã®èŠåã誀ã£ãŠæ¶ããªãããã«ããããã«ãäžèšã®åçŽåãããããžãã¯ãããã³ãã¬ãŒããé€å€ã§ããããã«ããŸãããããã¯ã / externalïŒtemplates-ãªãã·ã§ã³ãš/ externalïŒW <n>ãæž¡ãããšã§å®è¡ã§ããŸãã åæã«ããã³ãã¬ãŒãå®çŸ©ãå«ãŸããŠèŠåãçºè¡ãããæç¹ã§ã®çŸåšã®èŠåã¬ãã«ã ãã§ãªãããã³ãã¬ãŒãã®ã€ã³ã¹ã¿ã³ã¹åã®ã·ãŒã±ã³ã¹ã®ãã¹ãŠã®æç¹ã§ã®èŠåã¬ãã«ã調ã¹ãŸãã èŠåã¬ãã«ã¯ããã¹ãŠã®ã¬ãã«ã®ã¡ãã»ãŒãžã»ããå šäœã«å¯ŸããŠã©ãã£ã¹ã圢æããŸãïŒãã ããäžåºŠã«è€æ°ã®ã¬ãã«ã§èŠåãçºè¡ããããšããããããçæ³çã§ã¯ãããŸããïŒã ãã®ã©ãã£ã¹ã«é¢ããŠç¹å®ã®ããã°ã©ã ãã€ã³ãã§èš±å¯ãããã¹ãèŠåãå®çŸ©ããã¹ãŒããŒã»ããã¯ãã€ã³ã¹ã¿ã³ã¹åã®ãã§ãŒã³ãéããŠåããã°ã©ã ãã€ã³ãã§èš±å¯ãããã¡ãã»ãŒãžãçµã¿åãããããšã«ãã£ãŠååŸãããŸãã ããã¯ãŸãã«/ externalïŒtemplate-ããŒã®ç®çã§ãããå€éšããããŒãã¡ã€ã«ã«ä¿åããããŠãŒã¶ãŒïŒã€ãŸããå éšïŒã³ãŒãã«å®è£ ãããŠãããã³ãã¬ãŒãã«èŠåã衚瀺ã§ããŸãã
cl.exe / ExperimentalïŒexternal / externalïŒI some_lib_dir / externalïŒW0 / externalïŒtemplates- / W4 my_prog.cpp
ãã®ã³ãã³ãã䜿çšãããšãå€éšããããŒãã¡ã€ã«ã®èŠåã¬ãã«ã0ã§ãã£ãŠãèŠåã衚瀺ã§ããŸãã
èŠåã®æå¶ãšåŒ·å¶
äžèšã®ã¡ã«ããºã ã¯ãããèªäœã§ã¯èŠåããªã³ãŸãã¯ãªãã«ããŸãããæå®ããããã¡ã€ã«ã»ããã®ããã©ã«ãã¬ãã«ãèšå®ããã ãã§ãèŠåããªã³ããªããããã³æå¶ããããã®æšæºã¡ã«ããºã ãäœçšããŸãã
- / wdNNNNã/ w1NNNNã/ weNNNNã/ WvïŒXX.YY.ZZZZãªã©
- #pragma warningïŒdisableïŒ4507 34; onceïŒ4385; errorïŒ4164ïŒ
- #pragma warningïŒpush [ãn]ïŒ/ #pragma warningïŒpopïŒ
ãŸãã / externalïŒtemplates-ã䜿çšããå Žåãã€ã³ã¹ã¿ã³ã¹åãã€ã³ãã§èŠåãæå¶ããããšãã§ããŸãã åè¿°ã®äŸã§ã¯ããŠãŒã¶ãŒã¯/ externalïŒtemplates-ããŒã®ããã«çºè¡ãããèŠåãæ瀺çã«æå¶ããããšãã§ããŸãã
int main() { #pragma warning( suppress : 4245) return some_struct<unsigned int>().value; }
å察åŽã§äœæ¥ããŠããã©ã€ãã©ãªäœæè ã¯ãåãã¡ã«ããºã ã䜿çšããŠãç¹å®ã®ã¬ãã«ã®èŠåã®äžéšãŸãã¯ãã¹ãŠã匷å¶çã«å«ããããšãã§ããŸãããããã®èŠåã¯éåžžã«éèŠã§ããã / externalïŒW <n>ã¹ã€ããã§æå¶ãã¹ãã§ã¯ãªããšèããŠããå Žåã§ãã
äŸïŒ
å€éšããããŒãã¡ã€ã«ïŒsome_lib_dir / some_hdr.hpp
#pragma warning( push, 4 ) #pragma warning( error : 4245 ) template <typename T> struct some_struct { static const T value = -7; // W4: warning C4245: 'initializing': // conversion from 'int' to // 'unsigned int', signed/unsigned // mismatch }; #pragma warning( pop )
äžèšã®ããã«ã©ã€ãã©ãªããããŒãã¡ã€ã«ãå€æŽããããšã«ãããã©ã€ãã©ãªã®äœæè ã¯ããŠãŒã¶ãŒã/ externalïŒW <n>ãã©ã¡ãŒã¿ãŒã§æå®ããã¬ãã«ã«é¢ä¿ãªãããã®ãã¡ã€ã«ãã¬ãã«4ã§ãã§ãã¯ãããããšã確èªã§ããŸã-ã³ã³ãã€ã©ãŒã¯åŒãç¶ããã¹ãŠã®ã¬ãã«4èŠåãçºè¡ããŸããšã¢ããã ããã«ãããã«ç€ºãããŠããããã«ãç¹å®ã®èŠåã匷å¶çã«èšå®ããŠãåžžã«ãšã©ãŒãšèŠãªãããããã«ãããããã®ããããŒãã¡ã€ã«ã«å¯ŸããŠäžåºŠãªãã«ããããæå¶ããããäžåºŠã ãçºè¡ãããããããšãã§ããŸãããã®å ŽåãããŠãŒã¶ãŒã¯ãã®èšå®ããã€ãã¹ã§ããŸããã
å¶éäºé
çŸåšã®ããŒãžã§ã³ã§ã¯ãã³ã³ãã€ã©ãªããã£ãã€ã¶ãŒïŒã¹ãã£ããŒã§ã¯ãªãïŒã«ãã£ãŠçºè¡ãããå Žåãå€éšããããŒãã¡ã€ã«ã§èŠåãããªã¬ãŒã§ããŸãã ãã®ãããªèŠåã¯éåžžC47XX圢åŒã§ããããªããã£ãã€ã¶ãŒã«ãã£ãŠãã¹ãŠã®C47XXã¡ãã»ãŒãžãçºè¡ãããããã§ã¯ãããŸããã ååãšããŠãäœããã®èŠåãããŒã¿ãããŒãŸãã¯å¶åŸ¡ã®åæãå¿ èŠãšããå Žåãããããå®è£ ã®ãªããã£ãã€ã¶ãŒããã®ãã®ã§ããããããŸã§ã®ãšããæ°ããã¡ã«ããºã ã䜿çšããŠæå¶ããããšã¯ã§ããŸããã ãã®åé¡ã«ã€ããŠã¯ç¥ã£ãŠããŸãããäžéã³ãŒãã®è¡šç€ºã«å€§ããªå€æŽã䌎ãããããœãªã¥ãŒã·ã§ã³ã¯Visual Studioã®æ¬¡ã®ã¡ãžã£ãŒã¢ããããŒãã®åã«ã¯è¡šç€ºãããŸããã ãã ãããã®ãããªèŠåã¯ã/ wd47XXã¹ã€ããã䜿çšããŠãæšæºçãªæ¹æ³ã§åŒãç¶ãç¡å¹ã«ããããšãã§ããŸãã
ããã«ãæåã«ãŠãŒã¶ãŒã®ãã£ãŒãããã¯ã調ã¹ãããããã®å®éšçãªæ©èœã¯ãŸã èŠåã«çµ±å/åæãããŠããŸããã /åæã®èŠåã¯ã¬ãã«ã§åå²ãããªããããçŸåšã®ããžãã¯ãšããããçµã¿åãããæé©ãªæ¹æ³ãæ¢ããŠããŸãã
ãã®æ©èœãSDLã¢ã©ãŒãã§ã©ã®ããã«æ©èœãããã«ã€ããŠã¯ãŸã 説æã§ããŸããããSDLããŒã ãšé£çµ¡ãåãåããããã«ãç¥ããããŸãã
ãããã«
å£ãããŠã£ã³ããŠã®çè«ãšã®é¡æšã«æ»ããšãã©ã€ãã©ãªå šäœã®ãšã³ã·ã¹ãã ã«å¯Ÿããã€ãããŒã·ã§ã³ã®åœ±é¿ãææ§ã«è©äŸ¡ããŠããããšã«æ³šæããå¿ èŠããããŸãã äžæ¹ã§ããŠãŒã¶ãŒã¯ã©ã€ãã©ãªã®ãšã©ãŒãåé¡ãšèŠãªããªããªãããŠãŒã¶ãŒã«å ±åããããèªåã§ç·šéãããããå¯èœæ§ãäœããªãããããŠãŒã¶ãŒã«æ害ãäžããå¯èœæ§ããããŸãã äžæ¹ããŠãŒã¶ãŒã¯èªåã®ã³ãŒãããã现ããå¶åŸ¡ã§ããããã«ãªããã³ãŒãã«å¯ŸããŠããå³ããèŠä»¶ãèšå®ã§ããããã«ãªããŸãã 以åã¯ãå¶åŸ¡ã§ããªãã©ã€ãã©ãªãããããé»æ¢ããŠããŸããããçŸåšã¯ç·©åã§ããŸãã
åè¿°ã®å¯äœçšã®å¯èœæ§ãèªèããŠããŸããããµãŒãããŒãã£ã®ã³ãŒãã®ãšã©ãŒãä¿®æ£ããããšã¯ããã°ã©ããŒã®äž»ãªã¿ã¹ã¯ã§ã¯ãããŸããããªããªãã圌ã¯èªåã§äœæ¥ããå¿ èŠãããã³ãŒããæã£ãŠããããã§ããããã»ã¹ããã¡ã€ã«ã«å¯ŸããŠã®ã¿/ WXãªãã·ã§ã³ãæå¹ã«ã§ããªãããã ããããããã«éèŠãªããšã¯ãã©ã€ãã©ãªã«å¯Ÿãããã€ãã¹ã®åœ±é¿ãå¥ã®æçšãªçµæã«ãã£ãŠçžæ®ºãããããšã確信ããŠããŸãã
éçºè ããµãŒãããŒãã£ã©ã€ãã©ãªãžã®èŠåãé衚瀺ã«ã§ããããã«ããããšã§ãç¬èªã®ã³ãŒãã«ããã«æ³šæãæããæ¹åããå¯èœãªéãæ倧éã®ã¬ãã«ã§èŠåãå®å šã«ã¯ãªã¢ããããšãæšå¥šããŸãã ãµãŒãããŒãã£ã©ã€ãã©ãªã®äœæè ã¯åãéçºè ã§ããããã®ãã§ãŒã³å ã®å¥ã®ãªã³ã¯ã§ããã€ãŸãããµãŒãããŒãã£ã³ãŒãã®äŸåé¢ä¿ã«æ°ãåãããªãããã«ããæ©äŒãäžããç¬èªã®ã³ãŒãã®å質ã泚ææ·±ãç£èŠããå¯èœãªéãæ倧ã®èŠåã¬ãã«ã§ã³ã³ãã€ã«ããããšããå§ãããŸãã ãªã©ãªã©ã ãªããããéèŠãªã®ã§ããïŒ å®éããœãããŠã§ã¢éçºããã»ã¹ã®çŸåšã®æ§é ã§ã¯ãäŸåé¢ä¿ãã§ãŒã³ã«æ²¿ã£ãŠç§»åããã«ã€ããŠèŠåã®æ°ãéªåŽ©ã®ããã«å¢å ã ããã®ãã§ãŒã³ã«é²ãã«ã€ããŠèŠåã«å¯ŸåŠããããšãé£ãããªããŸãã éçºè ã¯èªéã§ãæ éãããç¶æ³ãä¿®æ£ããè©Šã¿ãåæ¢ããŸãã ã³ãŒããä»ã®äººã®ã³ãŒãããåé¢ã§ããå Žåããã§ãŒã³å ã®åéçºè ã¯ããã®èŠåã®éªåŽ©ãæ¢ããïŒçµæããããã¯ããïŒããã«èªç±ã«è³éãå©çšã§ããŸãã 圌ã¯èªåã®ãµã€ãããããã£ãŠãã§ãŒã³å šäœãžã®åœ±é¿ãæå°éã«ããã€ã³ã»ã³ãã£ããæã£ãŠããŸãã ãã¡ãããããã¯ææ©çãªçµè«ã§ããããã®åœ±é¿ã¯å³æžé€šãžã®æªåœ±é¿ã«å£ããªããšèããŠããŸãã
çµè«ãšããŠãæ°ããæ©èœãèªåã§äœéšããçµéšãå ±æããŠãã ããã ãèŠæããå¯ããã ããã奜ããªãã®ã ãã§ãªããæ°ã«å ¥ããªãã£ããã®ã«ã€ããŠããç¥ãããã ãããããã§ãªãå Žåã¯ãç©æ¥µçãªå°æ°æŽŸã決å®ããŸãã æ°ããã¡ã«ããºã ã¯ã Visual Studio 15.6 Preview 1ã®ãã¬ãã¥ãŒããŒãžã§ã³ã§äœ¿çšã§ããŸãã ãã€ãã®ããã«ã以äžã®ã³ã¡ã³ããæ®ããã visualcpp @ microsoft.comã«é»åã¡ãŒã«ãæžããŠãç§ãã¡ã«é£çµ¡ããããšãã§ããŸãã ãã£ãŒãããã¯ã¯ãã¡ãã¥ãŒã³ãã³ã[ãã«ã]-> [ 補åã®åé¡ã®å ±å ]ã䜿çšããŠéä¿¡ããããéçºè ã³ãã¥ããã£ã«æ®ããŸã ã TwitterïŒ @VisualC ïŒããã³FacebookïŒ msftvisualcpp ïŒã§ãã©ããŒããŠãã ããã
PS ãããŒãã»ã·ã¥ãŒãããã«æè¬ããŸãã圌ã¯ãç§ãã¡ã®çè«ãšå£ããçªã®çè«ãšã®é¡äŒŒæ§ãææããŸããïŒ
翻蚳è ã¡ã¢
- èšäºã¯èè ã®åæãåŸãŠå ¬éãããŠããŸãã å ã®èšäºã¯ãVisual C ++ Team Blogã«è±èªã§å ¬éãããŸããïŒ Broken Warnings Theory ã
- GitHubäœæè ãããã¡ã€ã«ïŒ solodon4
- Reddit Webãµã€ãã®èšäºã®è°è« ã