2007-10-01から1ヶ月間の記事一覧
なんか dynamic_cast<> のソースを見つけたので、それを改造して作ってみた。 #include <typeinfo.h> typedef void (*v_table_ptr)(); typedef struct _cpp_object { v_table_ptr* vtable; } cpp_object; typedef struct _rtti_base_descriptor { type_info* type_descri</typeinfo.h>…
気になったのでテスト template<class T> struct is_reference { static const bool value = false; }; template<class T> struct is_reference<T&> { static const bool value = true; }; template<class T> void Func(T value) { ::printf("%s", is_reference<T>::value ? "参照型" : "値型")</t></class></t&></class></class>…
http://www.nicovideo.jp/watch/sm1354477
http://www.nicovideo.jp/watch/sm1353036
http://www.nicovideo.jp/watch/sm1352160
id:moonphase:20071024#p4 今からwktkが止まらない。
http://www.nicovideo.jp/watch/sm1361048
汎用関数オブジェクトのためのパラメータ IParameter はこんな感じに定義しておけばいいだろう。 class _IParameter { public: virtual _IParameter() { } }; typedef boost::shared_ptr<_IParameter> IParameter; で、引数に取る型は全て内部的に _IParameter を継承する</_iparameter>…
http://www.nicovideo.jp/watch/sm1343697
http://www.nicovideo.jp/watch/sm1342044
http://www.nicovideo.jp/watch/sm1349397
http://www.nicovideo.jp/watch/sm1349426
http://www.nicovideo.jp/watch/sm1340413
http://www.nicovideo.jp/watch/sm1338458
こんなのあったら便利だなーって感じで作り始めてみました。 今やろうとしているのは、汎用関数オブジェクトのためのインターフェースクラスを用意して、そこから任意の数のパラメータを渡して呼び出せるようにすること。 class IFunction { public: virtual…
http://www.nicovideo.jp/watch/sm1328223
http://www.nicovideo.jp/watch/sm1327516
http://www.nicovideo.jp/watch/sm1327516
http://www.nicovideo.jp/watch/sm1326803
http://www.nicovideo.jp/watch/sm1326714
http://www.nicovideo.jp/watch/sm1325803
http://www.nicovideo.jp/watch/sm1324374
http://www.nicovideo.jp/watch/sm1321640
http://www.nicovideo.jp/watch/sm1330907
http://www.nicovideo.jp/watch/sm1331405
http://www.nicovideo.jp/watch/sm1314391
http://www.nicovideo.jp/watch/sm1315797
メモメモ。 足し算 addition 引き算 subtraction 掛け算 multiplication 割り算 division 和 sum 差 difference 積 product 余り remainder 加数 addend 減数 subtrahend 乗数 multiplier 被除数 dividend 除数 divisor 商 quotient 分数 fraction 分子 nume…
http://www.nicovideo.jp/watch/sm1309574
http://www.nicovideo.jp/watch/sm1304665