mpl::string

というわけで、Boost 1.40.0でmpl::string(コンパイル時文字列!)が追加されたので
試してみました。

#include <iostream>
#include <boost/mpl/string.hpp>

using namespace std;
namespace mpl = boost::mpl;

int main()
{
    typedef mpl::string<'Hell', 'o Wo', 'rld '> str;
    cout << mpl::c_str<str>::value << endl;
}
Hello World 

おぉ、ほんとに動くw


ちなみに、試したのはVC++ 9.0 SP1とGCC 4.4です。