2006-07-01から1ヶ月間の記事一覧

さよならnew

これを実装してみました・・・ソースコード VC++とGCCのみ対応ですが、どちらもちょっとずつおかしいので怪しい これをポータブルにするは大変だと思う []struct[] []A0[][] { [][]A0[][]() { } };[] []struct[] []A1[][] { [][]explicit[] []A1[][]([][]int…

Matafunctionのカスタマイズにenable_ifが使えた

タグディスパッチはいらなくなった、かもしれない・・・参照 []#include[] []<string>[] []#include[] []<boost/lexical_cast.hpp>[] []#include[] []<boost/type_traits/is_base_of.hpp>[] []#include[] []<boost/utility/enable_if.hpp>[]</boost/utility/enable_if.hpp></boost/type_traits/is_base_of.hpp></boost/lexical_cast.hpp></string>

lambda functorはassignableじゃない

default-constructibleではないどころかassignableじゃなかった Boost.Lambdaで作ったfilter_iteratorは不正 もちろんcopy-constructibleではあるので、それからassignableにして、さらにboost::optionalでdefault-constructibleにする 型へのadaptorのよう…

rangeをメモ化する

何重にもadaptorを重ねたrangeに複雑なアルゴリズムを適用するとすごく遅くなる そこで、memoize_range・・・ソースコード 実装に使ったspirit::multi_pass iteratorが謎だらけなので怪しい 要件がちょっと特殊なようでそのままでは使えなかった []using[] […