エントリーの編集
![loading...](https://b.st-hatena.com/bdefb8944296a0957e54cebcfefc25c4dcff9f5f/images/v4/public/common/loading@2x.gif)
エントリーの編集は全ユーザーに共通の機能です。
必ずガイドラインを一読の上ご利用ください。
記事へのコメント3件
- 注目コメント
- 新着コメント
注目コメント算出アルゴリズムの一部にLINEヤフー株式会社の「建設的コメント順位付けモデルAPI」を使用しています
![アプリのスクリーンショット](https://b.st-hatena.com/bdefb8944296a0957e54cebcfefc25c4dcff9f5f/images/v4/public/entry/app-screenshot.png)
- バナー広告なし
- ミュート機能あり
- ダークモード搭載
関連記事
Boost.Optional と Boost.InPlaceFactory で初期化遅延 - 野良C++erの雑記帳
boost::optional は「値 T あるいは無効値」を取ることのできるクラスです。 通常このクラスは、「失敗... boost::optional は「値 T あるいは無効値」を取ることのできるクラスです。 通常このクラスは、「失敗するかもしれない」関数の戻り値として使用されます: #include <boost/optional.hpp> #include <iostream> // 例として std::getline を optional で実装してみる boost::optional<std::string> getline_optional( std::istream& in ) { std::string result; if( getline( in, result ) ) { // 行の読み取りに成功 return result; } // 失敗。無効値( boost::none )を返す return boost::none; } int main() { // cat コマンドっぽい挙
2013/04/30 リンク