abstract å¿ è¦ãªããã <boost/optional.hpp> åºæ¥ãã㨠Tåã®å¤ã表ãã¦ãããããããªãããããªããããããªãåoptional<T> ãªãã¡ã¬ã³ã¹ en / jp sample #include <iostream> #include <boost/optional.hpp> using namespace std; using namespace boost; // âx ãè¶ããªãæ大ã®æ´æ°ãè¿ãé¢æ° // ãã ããxãè² ã®æ°ã®æã¯ããä¸æ£ã§ããã¨ããå¤ãè¿ã optional<int> sqrt( int x ) { if( x < 0 ) return optional<int>(); int i; for(i=0; i*i<=x; ++i) {} return optional<int>(i-1); } int main() { for(int j
{{#tags}}- {{label}}
{{/tags}}