2008-04-01から1日間の記事一覧

C++0x インスタンスからメンバの型を取得する

C++

identity + decltype でインスタンスからメンバの型を取得する #include <map> #include <string> using namespace std; int main() { map<int, string> dict; // pair<int, string> value = ... identity<decltype(dict)>::type::value_type value = *dict.begin(); value.first ...; value.second ...; return 0; }</decltype(dict)></int,></int,></string></map>…

C++0x(C++09 or C++10) と C++12(or C++13)

C++

An Interview with Bjarne Stroustrup BS: The standard will be finished in late 2008, but it takes forever to go through all the hoops of the ISO process. So, we must face the reality that "C++0x" may become C++10. 標準の策定は2008年中に完了…