以下の内容はhttps://faithandbrave.hateblo.jp/entry/2015/11/13/160619より取得しました。


Boost.Convert デフォルトコンバータ

Boost.Convertでは、boost::cvt名前空間by_defaultという型がデフォルトのコンバータクラスとなる。

デフォルトのコンバータは、先行宣言されているだけで定義はされていないので、デフォルトがどれなのかは、ユーザーが定義する。

#include <iostream>
#include <boost/convert.hpp>
#include <boost/convert/stream.hpp>

// ストリームによるコンバータを、デフォルトにする
struct boost::cnv::by_default : public boost::cnv::cstream {};

int main()
{
    boost::optional<int> result = boost::convert<int>("123");
    std::cout << result.get() << std::endl;
}

出力:

123



以上の内容はhttps://faithandbrave.hateblo.jp/entry/2015/11/13/160619より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14