Visual Studio 2010 Express

いつの間にかでてた -> http://www.microsoft.com/japan/msdn/vstudio/express/ 。とりあえず compiler だけ cmd.exe から使ってるんだけど vs9 で通らなかった以下の code がきちんと通るようになっていてちょっと感動した。

#include <algorithm>
#include <functional>
#include <iostream>
#include <iterator>
#include <string>
#include <vector>

int main(const int argc, const char* const argv[]) {
    std::vector<std::string> ss(argc);
    std::copy(argv, argv + argc, ss.begin());

    /*
     *  In vs9, following codes aren't passed, (maybe) due to bug of
     *  std::bind2nd. The functions that suppose references as arguments can't
     *  be applied std::bind1st or std::bind2nd.
     * */
    typedef int (std::string::*const_string_arg)(const std::string&) const;
    std::transform(
        ss.begin(), ss.end(),
        std::ostream_iterator<int>(std::cout, "\n"),
        std::bind2nd(
            std::mem_fun_ref(
                static_cast<const_string_arg>(&std::string::compare)),
            ss[0]));
    std::cout << std::endl;
}

あと個人的に Microsoft 社の処理系は diagnostic message がわかりやすくて比較的学習に適していると思うので ( っても他の処理系は g++ しか触ったことないけど ) 学生さんや趣味で書いてるひとはとりあえずみんな update しといたほうがいいと思う。