2011-01-12から1日間の記事一覧

クラステンプレートをメタ関数で特殊化したい

C++

Fusion! Boost.Geometry - Togetter ここら辺から派生した話。 素直にenable_ifを使えばできます。ただし複数の特殊化にマッチした場合はambiguousでコンパイルエラー #include <iostream> #include <string> #include <typeinfo> #include <cxxabi.h> #include <stdlib.h> #include <boost/type_traits.hpp> #include <boost/utility/enable_if.hpp> #ifdef __GNUC</boost/utility/enable_if.hpp></boost/type_traits.hpp></stdlib.h></cxxabi.h></typeinfo></string></iostream>…