問題タブ [g++4.9]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
c++ - Bucket count in unordered_map
In the sample program given below (source: http://www.cplusplus.com/reference/unordered_map/unordered_map/rehash/)
output becomes:
why the bucket count becomes 23?
What's the impact on heapsize? When does the heap allocation done? On bucket rehash or on actual insert? When the dynamic deallocation gets done? when clear()
is used or erase()
or both?
c++ - Linux の pthread_self
次の小さなコード スニペットがあります。
ライブラリなしでg ++ 4.9.2を使用してLinuxでコンパイル+リンクすると、出力は次のようになります。
以下のように pthread とリンクすると:
出力は次のとおりです。
-lpthreads とリンクすると、実際の POSIX スレッド ID からスレッド固有のインデックスへのマッピングを取得できますか? 使用するスレッド固有の値を持つグローバル配列が必要で、スレッド ID を配列インデックスとして使用する必要があり、139675118393152 を処理できません。たとえば、それを 1、2 などにマップする必要があります。
c++ - C++: 省略記号を使用した catch の例外を知るにはどうすればよいですか
g++ 4.9.2 コンパイラを使用する Linux 環境では、C++ コードで、次のように try .. catch ブロックを使用しました。
ヒント?