C++
N1905 [conv.integral] If the destination type is bool, see 4.12. If the source type is bool, the value false is converted to zero and the value true is converted to one. [conv.bool] An rvalue of arithmetic, enumeration, pointer, or pointer…
N1905 23.1.2 - 8 The insert members shall not affect the validity of iterators and references to the container, and the erase members shall invalidate only iterators and references to the erased elements C++の連想コンテナ全般(setとかmap系…
# define private public 検出器です.ついでに # define static_assert(...) 検出器も付けました.ご査収ください. http://t.co/l7oyLoZ9ky— でちまるさん(実際かわいい) (@decimalbloat) 2015, 6月 10 [Wandbox]三へ( へ՞ਊ ՞)へ ハッハッ https://t.co/k2oQ…
C++ ファイルのコンパイル & 実行を LL系言語並に快速にするツールを開発しました https://t.co/vFG6YPXF0Y— にゃおきゃっと (@nyaocat) 2015, 8月 5 ファイル中にコンパイルフラグを含められるのと、そのままファイルを実行する形式でガンガン書けるので我…
能書き Gtk+ には特殊なウィジェットとして socket, plug ウィジェットがあり, 親プロセスの持つ socket ウィジェット内に 別プロセスから plug ウィジェットを用いて描画させることが出来る. これだけでも充分面白いが,socket ウィジェットはウィジェッ…
メモ。 そもそも declval とは? 型T1, T2 があり、それらの値を乗算した結果の型を得たい場合、 素直に考えると decltype( T1() * T2() ) で得られそうだが、これは T1, T2 共にデフォルトコンストラクタが無いと T1(),T2()がコンパイルエラーになってしま…
C++11 では initializer_list が実装されたのでこんなことができます data.txt { { {1, 3}, {5, 8} }, { {3, 8}, {1, 0}, {8, 8} } } main.cpp #include <iostream> #include <utility> #include <vector> using namespace std; vector<vector<pair<int, int>>> dataset #include "data.txt" ; int main(){} 展</vector<pair<int,></vector></utility></iostream>…