![中3女子でもわかる constexpr](https://cdn-ak-scissors.b.st-hatena.com/image/square/7deb67e4125ff170360fdc60fc619d629bad0608/height=288;version=1;width=512/https%3A%2F%2Fcdn.slidesharecdn.com%2Fss_thumbnails%2Fconstexpr-111204124759-phpapp01-thumbnail.jpg%3Fwidth%3D640%26height%3D640%26fit%3Dbounds)
この記事はC++ Advent Calendar 2012の15日目にエントリしています。 内容はC++11「ムーブセマンティクス」の入門記事となっています。 もくじ ムーブセマンティクス再考 シンタックス vs. セマンティクス コピー vs. ムーブ ムーブのもつ2つの意味 C++11のムーブセマンティクス対応 auto_ptrからunique_ptrへ auto_ptrの暗い過去 unique_ptrへの移行 std::moveの役割 ムーブセマンティクスを使おう C++11標準ライブラリとムーブ ムーブ"後"の中身は? ムーブを利用して関数を書く (本文のみ約9500字) まえがき To move or not to move: that is the question. ― Bjarne Stroustrup, 2010(改)*1 プログラミング言語C++の新しい国際標準規格*2
Sustainable Security Requirements with the ASVS Josh Grossman provides a brief overview of what the ASVS is, but takes a closer look at balancing trade-offs and prioritizing different security requirements. Josh shares how to make the process repeatable and how to implement it as part of your own organization's requirements process.
Plowing through some devilish details of template argument deduction, the conditional operator and the macro preprocessor, Eric develops a robust FOR_EACH iterator. Whether you're using arrays, strings, or containers, this one does it all. Conditional Love: FOREACH Redux My CS201 "Software Development Methods" professor taught that all anyone would ever need to know about C++'s ternary conditional
http://thread.gmane.org/gmane.comp.lib.boost.devel/140434/ shared_ptr は, free store 上に参照カウント(と動的な削除子)を保持するオブジェクトを余分に必要とするので,基本的に(時間的・空間的)パフォーマンスとしては intrusive_ptr に劣る.なので, intrusive_ptr のほうが自然なんじゃないかと考える人が多いのだけれど,それに関する議論. 普通は intrusive_ptr が自然だと思われるのに shared_ptr があえてデフォルトとして推奨されているのには,なんらかの rationale があるはず. Peter Dimov 氏(個人的にスマートポインタのスペシャリストだと思っている人)による説明が以下.オレオレ的ちょーてきとー訳付き. http://thread.gmane.o
http://cpplover.blogspot.com/2011/07/mutex.html C++ のソースコード中に「途中のreturnや例外に気をつけること」などといったコメントはあってはならないため,補足. // 排他的にアクセスするリソース class exclusive_resource { public : std::vector<int> v ; private : std::mutex m ; public : void lock() { m.lock() ; } void try_lock() { m.try_lock() ; } void unlock() { m.unlock() ; } } ; exclusive_resource res1, res2 ; void thread1() {// res1のみを操作 std::lock_guard< exclusi
boostにはメモリプールをやってくれる親切なobject_poolと言うライブラリがある.この使い方は至って簡単で,テンプレートの引数にクラスを渡してプール用のオブジェクトを作成するだけとなる.指定したクラスの生成を行いたい場合(new classに相当)はconstruct関数を,削除したい場合(delete classに相当)はdestroy関数を呼び出すだけである.サンプルプログラムは以下のとおりとなる. #include <iostream> #include <string> #include <boost/pool/object_pool.hpp> class obj { public: std::string str; obj() { } virtual ~obj() { std::cout << "delete: " << str << std::endl; } }; i
This page has been incorporated into another. If you are not redirected automatically, click here. For questions related to the use of GCC, please consult these web pages and the GCC manuals. If that fails, the gcc-help@gcc.gnu.org mailing list might help. Comments on these web pages and the development of GCC are welcome on our developer list at gcc@gcc.gnu.org. All of our lists have public archi
I'm running Ubuntu 8.04 and I ran the command: $ ctags -R --c++-kinds=+p --fields=+iaS --extra=+q -f ~/.vim/tags/stdlibcpp /usr/include/c++/4.2.4/ to generate a ctags database for the standard C++ library and STL ( libstdc++ ) on my system for use with the OmniCppComplete vim script. This gave me a very reasonable 4MB tags file which seems to work fairly well. However, when I ran the same command
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く