ãã®ãã¼ã¸ã¯C++17ã«æ¡ç¨ãããè¨èªæ©è½ã®å¤æ´ã解説ãã¦ãã¾ãã ã®ã¡ã®C++è¦æ ¼ã§ããã«å¤æ´ãããå ´åãããããé¢é£é ç®ãåç §ãã¦ãã ããã æ¦è¦ C++17ã§ã¯boolåã«å¯¾ããåç½®ããã³å¾ç½®ã®operator ++ãåé¤ããã boolåã«å¯¾ããåç½®ããã³å¾ç½®ã®operator ++ã¨ã¯C++98ã®æç¹ã§éæ¨å¥¨ã«ãªã£ã¦ããæ©è½ã§ããã å ·ä½çã«ã©ã®ãããªåããããã®ãã¨ããã¨ã以ä¸ã®ããã«å¤ãtrueã«æ¸ãæããæ©è½ããã¤ã #include <iostream> int main() { bool b = false; const bool b1 = ++b; std::cout << std::boolalpha << b1 << std::endl; // => true const bool b2 = ++b; std::cout << std::boolalpha <<
{{#tags}}- {{label}}
{{/tags}}