エントリーの編集
![loading...](https://b.st-hatena.com/bdefb8944296a0957e54cebcfefc25c4dcff9f5f/images/v4/public/common/loading@2x.gif)
エントリーの編集は全ユーザーに共通の機能です。
必ずガイドラインを一読の上ご利用ください。
TR1以前のhash_mapをVisual Studio 2008とgccの両方で使う方法 - nodchipの日記
記事へのコメント0件
- 注目コメント
- 新着コメント
このエントリーにコメントしてみましょう。
注目コメント算出アルゴリズムの一部にLINEヤフー株式会社の「建設的コメント順位付けモデルAPI」を使用しています
![アプリのスクリーンショット](https://b.st-hatena.com/bdefb8944296a0957e54cebcfefc25c4dcff9f5f/images/v4/public/entry/app-screenshot.png)
- バナー広告なし
- ミュート機能あり
- ダークモード搭載
関連記事
TR1以前のhash_mapをVisual Studio 2008とgccの両方で使う方法 - nodchipの日記
趣味で書いているコードでハッシュを使った連想コンテナを使いたいのにTR1のunordered_mapが使えないと... 趣味で書いているコードでハッシュを使った連想コンテナを使いたいのにTR1のunordered_mapが使えないという状況に遭遇した。仕方なくhash_mapで実装することにした。ところがVisual Studio 2008とgccで仕様が異なっており、コード互換性をとるために四苦八苦してしまった。以下が出来上がったコードである。 #ifdef _MSC_VER #include <hash_map> using stdext::hash_map; #else #include <ext/hash_map> using __gnu_cxx::hash_map; #endif struct A { size_t hash; bool operator < (const A& rh) const { // (中略) } bool operator == (const A& rh) const {