boost

Boost.忘年会を札幌でも開催することになりました。

Boost.忘年会2010@sapporo : ATND http://sites.google.com/site/boostjp/study_meeting/year_end_party2010_at_sapporo 参加者募集中です。事の発端は... window.twttr = (function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0], t = window.tw…

呼出をトレースして実行時間を取る

Boost.ChronoでTrace - Faith and Brave - C++で遊ぼう chronoがライブラリにまだ入っていないので導入はちょっと・・・ ということで作った。 車輪の再発明臭いけど気にしない。elapsed_time.hpp #pragma once #include <algorithm> #include <boost/current_function.hpp> #include <boost/format.hpp> #include <boost/function.hpp> #in</boost/function.hpp></boost/format.hpp></boost/current_function.hpp></algorithm>…

Intelコンパイラ(11.1.048)でPSTADE_OVEN_FOREACHが使えなかった

msvc9.0で書いてたコードをicl11.1でコンパイルしてみようとしたら、 window.twttr = (function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0], t = window.twttr || {}; if (d.getElementById(id)) return t; js = d.createElement(s); js.id = …

魔導書の解読

・・・といっても中の解読じゃない。外側。 表紙のコードがなんなのか知りたくなった。http://longgate.co.jp/ 本家に、表紙の壁紙があります。どうやら地球よりこっち側の面と、向こう側の面で別のコードになっているらしい。ふむ。右上の辺りには*** *ain(…

型推論すごいねー

#include <boost/shared_ptr.hpp> #include <boost/make_shared.hpp> #include <iostream> struct Alloc { template<typename To> operator To() { return boost::make_shared<typename To::value_type>(); } }; struct A { A() { std::cout << "A::Ctor" << std::endl; } }; struct B { B() { std::cout << "B::Ctor" << s…</typename></typename></iostream></boost/make_shared.hpp></boost/shared_ptr.hpp>

もう一回ワンライナー。 今回はこちらのネタをお借りしまして http://d.hatena.ne.jp/nagoya313/20100619/1276954186 #include <fstream> #include <string> #include <list> #include <boost/regex.hpp> #include <boost/shared_ptr.hpp> #include <boost/make_shared.hpp> #include <pstade/oven/stream_lines.hpp> #include </pstade/oven/stream_lines.hpp></boost/make_shared.hpp></boost/shared_ptr.hpp></boost/regex.hpp></list></string></fstream>

ついったーのむぎゅ〜>ω<ポータルこと、桜花たん。http://d.hatena.ne.jp/rofi/20100606/1275852609今回もこんなに面白いことしてくれました。ちょっと、萌燃えますよね。したら、僕はこれだぜ! (ていうかパクりです。さーせん><。) #include <iostream> #inclu</iostream>…

さて、前回のエントリでは この部分 template<int RADIX> bool mirror_cmp(int figure, int num) { using namespace pstade::oven; PSTADE_OVEN_FOREACH(i, counting(0,figure/2)) { if( (num / power<RADIX>(figure-i-1)) % RADIX != (num / power<RADIX>(i)) % RADIX ) { return fal</radix></radix></int>…

さて、Mr.ExceptionのすずきさんがさっそうとProject EulerのProblem36を解いたらしいので、 僕も対抗心を燃やさせてください><。Problem36、 最初に例。585 = 1001001001(binary) このように10進数と2進数でともに回文になる数を1,000,000以下の整数の中…

Problem1:1簡単なことを難しく書いた結果がこれだよ! #include #include #include #include #include #include #include #include #include #include const int MAX_NUM = 1000; int main() { using namespace boost::assign; using namespace pstade::oven…

問:int型の配列(コンパイル時に長さがわかるもの) b を std::vector v1, v2, v3にそれぞれコピーして表示せよ。 #include #include #include #include #include #include int main() { using namespace std; using namespace pstade::oven; vector v1, v2, …

http://d.hatena.ne.jp/Nagise/20100321 ここにjavaでセミコロンなしってのがあって、 javaの文法なんてC言語/C++クローンだろ 歴史を同じくする言語なのでC++でも出来るだろJKとおもってやってみました。まず、helloworld #include int main() { if( std::c…