2013-12-01ãã1ã¶æéã®è¨äºä¸è¦§
ä»å¹´ã¯ä»ã¾ã§ä¸çªããã°æ¸ãã¾ããã åãã¦åå¼·ä¼ã«åå ããã¾ããã å 許ãåãã¾ããã ã¤ã³ã¿ã¼ã³ãçµé¨ãã¾ããã ããããªçµé¨ãç©ããã¨ãåºæ¥ã¾ããã æ¥å¹´ãè²ããªãã¨ãçµé¨ãã¦ããããã§ãã ãã¨ã²ã¼ã ä½ããããªã⦠è¯ããå¹´ã
using宣è¨ã¯æ¢ã«å®£è¨æ¸ã¿ã®ååã ããç¾å¨ã®ã¹ã³ã¼ãã«åãè¾¼ã¿ã¾ãã #include <iostream> namespace A { void f(double) { std::cout << "f(double)" << std::endl; } } using A::f; namespace A { void f(int) { std::cout << "f(int)" << std::endl; } } int main(</iostream>â¦
å æ¥ã®è¨äºã«ã¦ãC++ã«ã©ã ãå¼ã®å帰é¢æ°ã欲ããã¨æ¸ããã®ã§ããã調ã¹ããstackoverflowã«ã©ã ãå¼ã§ã®å帰é¢æ°ãå®ç¾ãããã¨ãã¦ããã³ã¼ããããã¾ããã #include <functional> #include <iostream> int main() { std::function<int (int)> fact; fact = [&fact](int n){ return n == </int></iostream></functional>â¦
C#æ¸ãã¦ãã¦ãããC++ã«ã欲ãããªããã¨æã£ãããæ®éã«ããããæ©è½æ¬²ããã¨æã£ããã®ã§ãã ãã¹ãããåå空é ä»ã®C++ã§ã¯ããæ¸ããªãã¨ããã¾ããã namespace hoge { namespace foo { ... } } ãããæ¸ãããè¯ããªããã¨æãã¾ããã namespace â¦
â»12/19 è¿½è¨ è¨äºæ¸ãã¦æ°æ¥å ¬éããããè¨ããã欲ãã¹ãããªã®ã§æ¶ãã¾ãã
ä»å¹´èªãã æè¡æ¸ãã¾ã¨ãããã¨æãã¾ããå¹´æ«ãªã®ã§æ¯ãè¿ã£ã¦ã¿ããã¨æãã¾ãã ä»å¹´ã¯ããé»è»ã«ä¹ã£ãããã¦æãæ½°ãæ©ä¼ãå¤ãã£ãã®ã¨ãæèçã«ç©ã¿æ¬ãæ¶åãããã¨ãã¦ããã®ã§ããããèªã¿ã¾ãããï¼åèªãã ã ãã§ã¯å ¨ã¦ç解ããããªãã®ã§ãä½â¦
ãã«ãã¡ã½ãã3 åã¾ããæ¹è¯ç·¨ã®ç¶ãã§ãã basic_dispatcher flat_mapã使ã RTTI(å®è¡æåæ å ±)ã¨ãtype_index(typeinfoãæ¯è¼ã§ããããã«ã©ããããå)ã®2ã¤ããããã¨ã«ãããå ¨ã¦ã®åã«å¯¾ãã¦(ãã¡ããåçãªåãå«ã¿ã¾ã)ãé åºé¢ä¿ãæã¤ãã¨ãåºâ¦