[表示 : 全て 最新50 1-99 101- 201- 301- 401- 501- 601- 701- 2chのread.cgiへ]
Update time : 05/08 21:12 / Filesize : 199 KB / Number-of Response : 759
[このスレッドの書き込みを削除する]
[+板 最近立ったスレ&熱いスレ一覧 : +板 最近立ったスレ/記者別一覧] [類似スレッド一覧]


↑キャッシュ検索、類似スレ動作を修正しました、ご迷惑をお掛けしました

Boost総合スレ part8



1 名前:デフォルトの名無しさん [2009/08/28(金) 16:53:36 ]
過去スレ
part 7 pc12.2ch.net/test/read.cgi/tech/1232367742/
part 6 pc11.2ch.net/test/read.cgi/tech/1207749841/
part 5 pc11.2ch.net/test/read.cgi/tech/1192662575/
part 4 pc11.2ch.net/test/read.cgi/tech/1175663346/
part 3 pc11.2ch.net/test/read.cgi/tech/1158991211/
part 2 pc8.2ch.net/test/read.cgi/tech/1139313234/
part 1 pc8.2ch.net/test/read.cgi/tech/1091198276/

■関連サイト■
Boost C++ Libraries
www.boost.org/

Boost 翻訳プロジェクト
boost.cppll.jp/HEAD/

Let's Boost
www.kmonos.net/alang/boost/

boost info
shinh.skr.jp/boost/

276 名前:デフォルトの名無しさん mailto:sage [2009/10/17(土) 15:39:51 ]
開場がGREEってだけで行く気無くす
それより秀和の本の1.40か1.41対応第3版出してくれ
2版がまだ余ってるらしいので出せるかどうか結構微妙ではあるが

277 名前:デフォルトの名無しさん mailto:sage [2009/10/17(土) 15:43:19 ]
ああ、でもC++0xというかVC2010が出てからの方がいいか
あっちに結構吸収されたライブラリがあるから

278 名前:デフォルトの名無しさん mailto:sage [2009/10/18(日) 11:08:56 ]
>>276
boostのドキュメントを素直に翻訳したものを出してほしい

279 名前:デフォルトの名無しさん mailto:sage [2009/10/18(日) 19:58:35 ]
boostのドキュメントのPDF版見てみりゃわかるけど、リファレンス部含めたらasioだけで969ページある
全部のドキュメント訳したら何千ページにもなるだろうからコミュニティベースで訳す他無いんじゃないか
最も、今までその試みが何度失敗したか分からんがね

第3版にrange_exが間に合うと良いなあ

280 名前:デフォルトの名無しさん mailto:sage [2009/10/18(日) 22:07:45 ]
つかえねーやつほど
道具のせいにする
道具にも馬鹿にされて自己嫌悪に陥るな

281 名前:デフォルトの名無しさん mailto:sage [2009/10/19(月) 00:01:26 ]
valut から property tree 落としてきて使ってみた。
これ面白い。
INI parser しか試してないけど、レジストリも触れちゃうみたい。

282 名前:デフォルトの名無しさん mailto:sage [2009/10/21(水) 13:09:36 ]
> boostのドキュメントのPDF版
その存在を始めて知った!
HTMLしかないと思っていたよ

283 名前:デフォルトの名無しさん mailto:sage [2009/10/21(水) 22:03:52 ]
わたしも……(´・ω・`)

284 名前:デフォルトの名無しさん mailto:sage [2009/10/22(木) 09:42:09 ]
boostは便利だなぁ〜使えば使うほど実感するよ
挙動がよくわからなかったりマニュアルの英語が何言っているか理解できないときは
ヘッダを読むけどコレがとても為になるですよ



285 名前:デフォルトの名無しさん mailto:sage [2009/10/22(木) 09:45:16 ]
$BOOST_ROOT/libs/*/test/*あたりのコードも参考になった

286 名前:デフォルトの名無しさん mailto:sage [2009/10/23(金) 11:15:11 ]
CMakeのあつかいが変わった
めんどくせー

287 名前:デフォルトの名無しさん mailto:sage [2009/10/23(金) 21:19:15 ]
>>286
CMake関連のファイルが大量に削除されたり変更されたりしていたので、
試しにプロジェクトを作成しようとしたらエラーになってしまったのですが
ビルド可能なのですか?

288 名前:デフォルトの名無しさん mailto:sage [2009/10/23(金) 22:00:59 ]
更新しました。
ttp://booster.x0.to/
以下更新内容の一部
[Spirit]
Spirit: fixing endianess/truncation problem in Karma|s output iterator
Spirit: fixing tests for big endian binary generator
Spirit: removed undefined behavior in grammar initialization
[Interprocess]
Fixes for 1.41
[Intrusive]
Fixes for 1.41
[Graph]
Removed assertions that may depend on FP precision.
[Serialization]
add non-polymorphic pointer test
[Pool]
Allow zero-sized blocks to be allocated by malloc_n. Fixes #386
[Unordered]
Use normal emplace implementation for emplace_hint and insert with hint.
Fix allocator for construct from initializer list.
[Random]
Disable some warnings for msvc. Fixes #3532
[Math]
Improve ibeta error handling, and add new tests.
[Detail]
fix for fix in r35591: sometimes __hppa is on PA-RISC but __hpux isn't Fixes ticket #3537
[Signals2]
Qualify addressof call, refs #3534.
[Python]
Fix for #3490, parameter depends on python.
[Thread]
Added futures to boost.thread

289 名前:デフォルトの名無しさん mailto:sage [2009/10/24(土) 13:15:03 ]

www.boost.org/doc/libs/1_39_0/libs/wave/doc/quickstart.html
にあるwaveのサンプルプログラムの、while(first != last) のiteratorの比較で
boost::wave::preprocess_exception例外投げるんだけど、なんで?

context の設定だけ
ctx.add_macro_definition("_WIN32");
ctx.add_macro_definition("_MSC_VER=1500");
ctx.set_language(boost::wave::language_support(boost::wave::support_cpp));
ctx.add_sysinclude_path("E:\\lib\\boost\\boost_1_39");
ctx.add_sysinclude_path("C:\\Program Files\\Microsoft Visual Studio 9.0\\VC\\include");
な風にしたけど・・・


290 名前:デフォルトの名無しさん mailto:sage [2009/10/24(土) 16:46:27 ]
>>287
別サイトから、CMakeの分だけダウンロードするようになった


291 名前:デフォルトの名無しさん mailto:sage [2009/10/24(土) 17:07:41 ]
cmakeみたいなゴミ使わずにbjam使いましょう

292 名前:デフォルトの名無しさん mailto:sage [2009/10/24(土) 17:11:27 ]
bjamとかカスだし。

293 名前:デフォルトの名無しさん mailto:sage [2009/10/24(土) 17:58:44 ]
ゴミクズじゃないビルドシステムなど無い

294 名前:デフォルトの名無しさん mailto:sage [2009/10/24(土) 18:01:27 ]
bjamなんてドキュメント読めば2秒で理解できるぞ



295 名前:デフォルトの名無しさん mailto:sage [2009/10/24(土) 20:16:13 ]
ドキュメント読むのが億劫で読んでいなくてごめんなさい。

296 名前:デフォルトの名無しさん mailto:sage [2009/10/24(土) 20:26:11 ]
事実上CMake対応は放棄か。

297 名前:デフォルトの名無しさん mailto:sage [2009/10/24(土) 20:48:02 ]
なんでCMakeでビルドしたがるの?
bjamがあるじゃん。

Boostのビルドにおいて
CMakeがbjamを上回ることってなんかあるの?

特に>>292


298 名前:デフォルトの名無しさん mailto:sage [2009/10/24(土) 21:13:38 ]
>>294
2秒でドキュメントは読めない

299 名前:デフォルトの名無しさん mailto:sage [2009/10/24(土) 21:18:03 ]
ドキュメントを隅々まで読み終えてから、もう2秒必要ということなんだろう。

300 名前:デフォルトの名無しさん mailto:sage [2009/10/24(土) 21:21:11 ]
えっくすこおおおおおおおおおおおおおおおおおおおおおおおおおおおおおおおおおおおおおおおおおおおおおおおおおおおおおおおおど

301 名前:デフォルトの名無しさん mailto:sage [2009/10/24(土) 21:22:05 ]
CMAKEなんてドキュメント読まなくても理解できたぞ。
ところで、なんで>>296みたいなアホがいるんだ。
ほんとに質が低いなこのスレは。

302 名前:デフォルトの名無しさん mailto:sage [2009/10/24(土) 21:36:33 ]
自分で書くのならbjamよりcmakeの方が楽だった
y-hamigakiさんの書いた資料のおかげというのもあるけど
CMakeはprecompiled headerを使うのだけでも一苦労、
flymake用のsyntax check用の高速にビルドできるタスクを定義するのは並大抵のもんじゃないときた
cmake .とかするだけの使い方するなら問題ないけどな

303 名前:デフォルトの名無しさん mailto:sage [2009/10/24(土) 22:19:51 ]
>>299
なるほど。
なら可能だ

304 名前:デフォルトの名無しさん mailto:sage [2009/10/25(日) 00:26:41 ]
cmakeは使ったことないけど、bjam(+boost-build)はそこそこ対応コンパイラが多いのと、
自動的にdebug/releaseビルドのobjファイルを別場所に配置してくれるので切り替えが楽という利点があるな。
逆に問題はドキュメントが異様に少ないこと。
でもビルドに必要な大抵のことは(きちんとドキュメント化されているかは別として)できるかな。



305 名前:デフォルトの名無しさん mailto:sage [2009/10/27(火) 05:02:38 ]
Check failed in file /usr/include/boost/numeric/ublas/vector_expression.hpp at line 548:
size1 == size2
terminate called after throwing an instance of 'boost::numeric::ublas::bad_argument'
what(): bad argument
Aborted

このエラーの対処法教えてください

306 名前:デフォルトの名無しさん mailto:sage [2009/10/27(火) 07:00:59 ]
>>305 osdir.com/ml/lib.boost.ublas/2006-03/msg00018.html

307 名前:デフォルトの名無しさん mailto:sage [2009/10/27(火) 11:27:08 ]
>>306
ありがとうございます
参考にしてみます

308 名前:デフォルトの名無しさん mailto:sage [2009/10/28(水) 23:41:26 ]
bool pred(int n) { return n; }

struct hoge { int foo() { return 0; } };
struct bar { hoge hoge_; hoge fuga() { return hoge_; } };

std::vector<bar> bars;

std::count_if(bars.begin(), bars.end(), pred(bind(&bar::fuga, _1)().foo()));

bars の各インスタンス _1 のうち、pref(_1.fuga().foo()) を満たす物の個数を数えたくて
上記 std::count_if のように boost.lambda を用いて呼び出してみたのですが,
コンパイルエラーとなってしまいました.

上記のような目的を達成するにはどうすればよいのでしょうか?
C++ 0x 対応であればなんとか出来そうな気がしますが、環境が VC2008 なので使え
ません.lambda や bind で書けるのでしょうか?詳しい人教えて下さい・・・

309 名前:デフォルトの名無しさん mailto:sage [2009/10/29(木) 00:03:07 ]
>308
これでどないでしょ。

bool pred(int n) { return n; }

// 恐らく一時オブジェクトに対する参照が必要になるので const が必要
struct hoge { int foo() const { return 0; } };
struct bar { hoge hoge_; hoge fuga() { return hoge_; } };

std::count_if(bars.begin(), bars.end(), bind(pred, bind(&hoge::foo, bind(&bar::fuga, _1))));

310 名前:デフォルトの名無しさん mailto:sage [2009/10/29(木) 00:16:06 ]
こうなると名にやってんのか逆に分かりにくいな

311 名前:デフォルトの名無しさん mailto:sage [2009/10/29(木) 06:55:58 ]
#define _ bind
std::count_if(bars.begin(), bars.end(),
    _(pred,
                _(&hoge::foo,
            _(&bar::fuga,
        _1))));
#undef _

312 名前: [―{}@{}@{}-] デフォルトの名無しさん mailto:sage [2009/10/29(木) 14:14:43 ]
というか0xならもっと分かりやすく書けるの?

313 名前:デフォルトの名無しさん mailto:sage [2009/10/29(木) 14:22:38 ]
std::count_if(bars.begin(), bars.end(),
    [] (bar& x) -> bool { return pred(x.fuga().foo()); })

314 名前:デフォルトの名無しさん mailto:sage [2009/10/29(木) 14:24:00 ]
あ、戻り値の型はコンパイラにまかせてもいいんだったっけ。

std::count_if(bars.begin(), bars.end(),
    [] (bar& x) { return pred(x.fuga().foo()); })



315 名前:デフォルトの名無しさん mailto:sage [2009/10/30(金) 22:23:22 ]
更新しました。今週はsmart_ptr, thread, regex, xpressiveといった割と使われていそうなライブラリに
fixや仕様変更が入っています。
ttp://booster.x0.to/
以下更新内容の一部
[Spirit]
Spirit: more work on attribute traits,
allowing optional for alternatives, maxwidth supports extracting overhang
[Fusion]
fix for #2355: discrepancy between std::accumulate and fusion::accumulate
[Regex]
Tighten up error handling and checking.
[Unordered]
Remove 'grouped' from hash_table as it isn't used and is a bit confusing.
[Circular_buffer]
circular_buffer: added erase_begin and erase_end methods

316 名前:デフォルトの名無しさん mailto:sage [2009/10/30(金) 22:24:35 ]
Fix for bug #2067 --- use shared_mutex for thread_group rather than a simple mutex
Fix for move assignment of unique_lock if rvalue refs supported
More fixes for compilers with rvalue ref support
[Xpressive]
nested results uses a custom list type that allows incomplete types,
does no dynamic allocation in the default constructor,
and has a guarnteed O(1) splice; fixes #3278
[Smart_ptr]
Renamed enable_shared_from_this2 to enable_shared_from_raw and
added shared_from_raw free function. These changes fix the pointer
value in shared_ptr which were obtained before an external shared_ptr has
taken ownership of the object (for example when a shared_ptr to
this is obtained in an object's constructor).
[Numeric]
see #3501: Reusing concepts from different compile units yields multiple defined symbols (Incomplete)
* removed inlines that were added with the last commit
* added anonymous namespace to make functions local to compilation unit

317 名前:デフォルトの名無しさん mailto:sage [2009/10/30(金) 22:27:06 ]
すみません、>>316はミスです。315の後こちらを続けて下さい

[Thread]
Fix for bug #2067 --- use shared_mutex for thread_group rather than a simple mutex
Fix for move assignment of unique_lock if rvalue refs supported
More fixes for compilers with rvalue ref support
[Xpressive]
nested results uses a custom list type that allows incomplete types,
does no dynamic allocation in the default constructor,
and has a guarnteed O(1) splice; fixes #3278
[Smart_ptr]
Renamed enable_shared_from_this2 to enable_shared_from_raw and
added shared_from_raw free function. These changes fix the pointer
value in shared_ptr which were obtained before an external shared_ptr has
taken ownership of the object (for example when a shared_ptr to
this is obtained in an object's constructor).
[Numeric]
see #3501: Reusing concepts from different compile units yields multiple defined symbols (Incomplete)
* removed inlines that were added with the last commit
* added anonymous namespace to make functions local to compilation unit

318 名前:デフォルトの名無しさん mailto:sage [2009/11/06(金) 22:04:19 ]
ttp://booster.x0.to/
以下更新内容の一部
[Spirit]
Spirit: fixing lex::tokenize_and_parse functions
Fix. Disallow alpha or underscore after "int"
Spirit: fixing usage of plain functions as lexer semantic actions
Spirit: replaced long long by boost::long_long_type
[Ptr_container]
https://svn.boost.org/trac/boost/ticket/3579
[Fusion]
Fusion: adding a missing 'const'
associative_sequence_tag -> associative_tag
[Regex]
Added support for function objects as well as strings when formatting.
[Program_options]
Fix 'ambiguous else clause' compiler warning. Fixes #3556.
Put description to next line if we'd overflow otherwise. Fixes #689.
Use extra parens to silence warnings re &&/|| on same level.
[Xpressive]
fix infinite loop with some uses of \Q...\E quotemeta, fixes #3586
[Math]
remove surplus const-qualifiers.
[Wave]
Wave: added missing header file and special handling for stlport
[Smart_ptr]
Added weak_from_raw(), for use in conjunction with
enable_shared_from_raw base class.

亦、how_to_build.txt及びlibs_for_build_boost.rar内bjam.exe, readme.txtも併せて更新致しました。
それから、公式でのリリース版バイナリの配布が開始されました。
同じくBoost 1.41 betaの配布も始まっています。
ttp://sourceforge.net/projects/boost/files/

319 名前:デフォルトの名無しさん mailto:sage [2009/11/07(土) 05:42:37 ]
>>318

320 名前:デフォルトの名無しさん [2009/11/10(火) 10:06:18 ]
template<class F>
struct is_lambda_impl
{
static const bool value = false;
};
template<class F, class A0>
struct is_lambda_impl<boost::lambda::lambda_functor<F>(A0)>
: public boost::lambda::lambda_functor<F>::template sig<boost::lambda::tuple<boost::lambda::lambda_functor<F>, A0> >
{
static const bool value = true;
};
template<class F, class A0, class A1>
struct is_lambda_impl<boost::lambda::lambda_functor<F> (A0, A1)>
: public boost::lambda::lambda_functor<F>::template sig<boost::lambda::tuple<boost::lambda::lambda_functor<F>, A0, A1> >
{
static const bool value = true;
};
template<class F>
bool is_lambda_(F)
{
return is_lambda_impl<F(????)>::value;
}
int main()
{
std::cout << is_lambda_((boost::lambda::_1 * 2)) << "\n";
std::cout << is_lambda_(std::plus<int>()) << "\n";
}

321 名前:デフォルトの名無しさん [2009/11/10(火) 10:07:50 ]
お遊びですが・・・
>>320 のプログラムは、lambdaか否かを判断するmeta function を作ろうとした
のですが、???? の部分で困っています。

boost::lambda::_1 * 2 とある時、引数の型が知りたい。
でも、これは無理ですよね。

簡単言うと、is_lambda_implをlambda式に応じて呼び分けしたいのです。
何かいい案ないですか?

322 名前:デフォルトの名無しさん mailto:sage [2009/11/10(火) 10:14:14 ]
>>320
is_lambda_impl<F>::value じゃないの?
そうじゃなければ何がしたいのかよくわからん。

323 名前:デフォルトの名無しさん [2009/11/10(火) 10:26:39 ]
>>322
それじゃ駄目ポ。
template<class F>
struct is_lambda_impl
{
static const bool value = false;
};
にいっちゃいます。

324 名前:デフォルトの名無しさん mailto:sage [2009/11/10(火) 10:29:47 ]
>>323
なら ???? の部分じゃなくて特殊化ができてないんじゃないの?



325 名前:デフォルトの名無しさん [2009/11/10(火) 10:34:21 ]
>>324
あんまり、そこに拘る必要はないです。
lambdaか否かを判断するmeta function が作れればおk。

326 名前:デフォルトの名無しさん [2009/11/10(火) 10:40:42 ]
>>324
F(????)としてるのは、F(int)とすれば
template<class F, class A0>
struct is_lambda_impl<boost::lambda::lambda_functor<F>(A0)>
が選択されるからです。

int 部分にはboost::lambda::_1の型か何か別のものが入ると思う。
_1 や _2 の数によって F(A0) F(A0, A1) の様な形になると思う。

327 名前:デフォルトの名無しさん [2009/11/10(火) 11:00:54 ]
こゆこと? (動作確認してないけど)

template<template <class f> class T, class F>
bool is_lambda_(T<F>)
{
return is_lambda_impl<T<F> >::value;
}

template<template <class f, class a0> class T, class F, class A0>
bool is_lambda_(T<F, A0>)
{
return is_lambda_impl<T<F, A0> >::value;
}

template<template <class f, class a0, class a1> class T, class F, class A0, class A1>
bool is_lambda_(T<F, A0, A1>)
{
return is_lambda_impl<T<F, A0, A1> >::value;
}

328 名前:デフォルトの名無しさん mailto:sage [2009/11/10(火) 11:01:01 ]
>>325
まずは、何か lambda expression だけの特性を探すことだね。

unlambda してみて違う型が返ってくるようなら true になる関数とか?

329 名前:デフォルトの名無しさん [2009/11/10(火) 11:23:13 ]
>>328
unlambdaすると false になります。

330 名前:デフォルトの名無しさん [2009/11/10(火) 20:24:31 ]
>>327
駄目ポ。

template<template <class f> class T, class F>
bool is_lambda_(T<F>)
全て↑が選択されて、falseになる

331 名前:デフォルトの名無しさん mailto:sage [2009/11/11(水) 01:34:45 ]
>>328
遊びだとか実装方法は問わないとか言ってるから、 unlambda() のソースから
扱いを分けてるところパクってきたほうが早そう。

332 名前:デフォルトの名無しさん [2009/11/11(水) 11:41:35 ]
できた。でもg++でコンパイル通らないorz
codepad.org/2lcnEjvI

333 名前:デフォルトの名無しさん [2009/11/11(水) 17:16:17 ]
g++でもできた。単純なミスだった。
codepad.org/LUAbunUM

334 名前:デフォルトの名無しさん mailto:sage [2009/11/13(金) 23:53:06 ]
更新しました。今週はコンパイル時の警告の抑制が中心の様です。
ttp://booster.x0.to/
以下更新内容の一部
[Spirit]
Spirit: fixing bug in alternatives taking optionals
Spirit: started to integrate re2c style code generator for lexer
[Regex]
Improved error messages generated for thrown exceptions.
[Program_options]
Fix wordwrapping in presense of default parameters.
Don't strip quotes from values.
[Smart_ptr]
Fixed access to enable_shared_from_raw::weak_this_ when
BOOST_NO_MEMBER_TEMPLATE_FRIENDS is defined.
[Unordered]
Change unordered move tests to be more lenient on compilers without NRVO.
[System]
System: Correct too_many_symbolic_link_levels misspelling. Fix #3559.



335 名前:デフォルトの名無しさん mailto:sage [2009/11/13(金) 23:53:49 ]
[Graph]
Changed to boost::unordered_* containers instead of compiler-specific ones;
made hashed containers enabled always
[Integer]
Reverted Integer back to Release branch state - as per devel-list discussions.
[Xpressive]
do NOT copy singular iterators, fixes #3538
[Iostreams]
Allocate exceptions on the stack, not the heap. Refs #3612, by Richard Smith.
Fix unthrown exceptions. Refs #3311.
Fix mapped file errors in windows. Refs #3505.
[Exeption]
Prevent ADL from finding other dispatch functions or types. Required for #2094.
[Fusion]
avoid iterator invalidation in segmented_range, fixes #3583

亦、libs_for_build_boost.rar内bjam.exeも併せて更新致しました。

336 名前:デフォルトの名無しさん mailto:sage [2009/11/14(土) 15:45:45 ]
Boost 1.41 の
boost/function_types/detail/synthesize_impl/arity20_0.hpp
boost/function_types/detail/synthesize_impl/arity30_0.hpp
がおかしくね?
なんかソースが途中で切れたみたいになってる。
手元で確認できるかぎりでは、svn56164 で正常。
svn57242 ではおかしくなってる。


337 名前:デフォルトの名無しさん mailto:sage [2009/11/15(日) 02:14:23 ]
お前だけじゃね?
こっちはそんなことないが。

338 名前:デフォルトの名無しさん mailto:sage [2009/11/15(日) 09:23:37 ]
>>336
ちゃんとSubversion使ってる?

339 名前:デフォルトの名無しさん mailto:sage [2009/11/15(日) 10:12:48 ]
>>336
ほんとだ。
リビジョン番号 56305以降がおかしい。
stefanが更新してる

340 名前:デフォルトの名無しさん mailto:sage [2009/11/15(日) 11:08:03 ]
まったくもう、ステフったら……

341 名前:デフォルトの名無しさん [2009/11/16(月) 16:27:52 ]
codepad.org/PnJLqsJw

Boost.Propertyを使ったお試しコードを書いたのですが、Property用のメンバーをstringにすると以下の様な
エラーになるんだけど、原因分かる人いる?

error C2679: 二項演算子 '<<' : 型 'Person::_PropertyNamaeImpl_' の右オペランドを扱う演算子が見つかりません (または変換できません)。 e:\property_test.cpp 57

property_get::operator return_type()まで来ないので、ADL系の様な気がする・・・
なぜ、来ないのか分からない。

342 名前:デフォルトの名無しさん mailto:sage [2009/11/18(水) 06:38:03 ]
boost::function、bind、refの組み合わせってboost::spiritのセマンティックアクションに
渡せますが、tr1の物だとダメなようです。
これらのようにtr1とboostの物での違いの、一覧みたいなのは無いでしょうか?

343 名前:デフォルトの名無しさん mailto:sage [2009/11/20(金) 23:35:32 ]
[Spirit]
Spirit: more static lexer updates
Spirit: added new Qi example
Spirit: updating example
Don't match substrings in symbols::find.
Added Nabialek Trick Example
typeof example
Implement prefix_find.
BOOST_SPIRIT_AUTO added
Spirit: bumped version number after the release of 1.41
Spirit: fixed references to corresponding articles at Spirit site.
[Xpressive]
use boost::optional's swap instead of std::swap
[Random]
Allow arbitrary values to be used as seeds for linear_congruential,
linear_feedback_shift, and any generators that depend on them. Fixes #3516
Fix min/max problems

344 名前:デフォルトの名無しさん mailto:sage [2009/11/20(金) 23:36:07 ]
[Exeption]
Fixed unqualified use of size_t in object_hex_dump.hpp
Bug ticket 3641, also merging other fixes from the Release branch.
[Format]
copy-constructor now copies .dumped_ , fixing Ticket #3610
fixing elementary syntax error introduced in rev. 57734
[Functional]
Turn on warnings as errors for the hash tests.
[Program_options]
Add option name to a few exception classes. Fixes #3423. Patch from Sascha Ochsenknecht.
correct usage of tokenizer, memory bug, Fixes #3525
[Graph]
Fix compilation error due to undefined fprintf/stderr.
[Unordered]
Use 'E' for key extractor, freeing 'K' for key.
Support incomplete template parameters to unordered containers.
以上更新内容の一部
ttp://booster.x0.to/



345 名前:デフォルトの名無しさん mailto:sage [2009/11/21(土) 01:53:49 ]
Version 1.41.0
New Library: Property Tree.
Updated libraries: DateTime, Filesystem, Iostreams, Math, Multi-index Containers,
Proto, Python, Regex, Spirit, System, Thread, Unordered, Utility, Wave, Xpressive.
Updates to boost build and quickbook. The CMake build system for Boost, still
under development here, has been removed from the main release to avoid confusion.

346 名前:デフォルトの名無しさん mailto:sage [2009/11/24(火) 01:34:40 ]
boost::iostreamsを使ってストリームりました。
このストリームを外から見たときはboostを使ったように見えないように、ダウンキャストしてostreamか何かに入れて置きたいのですが、どうにもうまくいきません。
どうしたら良いのでしょうか。

std::ostream a = boost::iostreams::stream<boost::iostreams::null_sink>();

こんなことがしたいです。

347 名前:デフォルトの名無しさん mailto:sage [2009/11/24(火) 02:01:44 ]
>>346
たぶん、C++0xだとそれでコンパイルできると思う。

とりあえず現状ではtypedef boost::iostreams::stream<hogehoge> my_stream_type;みたいにごまかすくらいしかないと思う。
もちろん、オブジェクトを関数の引数として渡すときには、もちろんstd::ostream&やstd::istream&で受け取れるけど。

348 名前:346 mailto:sage [2009/11/24(火) 02:16:53 ]
>>.347
解答ありがとうございます。出来ませんか・・・。

349 名前:デフォルトの名無しさん mailto:sage [2009/11/24(火) 05:18:50 ]
メンバ変数なり関数ローカルなstatic変数にして、
std::ostream& を返す取得関数で公開すれば具象型はいちおう隠蔽できるけど。
それで不都合あったり?

350 名前:デフォルトの名無しさん [2009/11/24(火) 18:34:11 ]
resizeするときに、fortran_storage_order()のオプションを与える方法を教えていただけないでしょうか?
以下のように、fortran_storage_order()をつけるとresizeでエラーとなります。
  #include <boost/multi_array.hpp>
  int n = 200;
  typedef boost::multi_array<double, 2>::extent_range erange;
  boost::multi_array<double, 2> matrix(boost::extents[0][0]);
  matrix.resize(boost::extents[erange(1,n+1)][erange(1,n+1)], boost::fortran_storage_order());

351 名前:デフォルトの名無しさん mailto:sage [2009/11/27(金) 19:25:51 ]
更新しました。1.41正式版がリリースされてから一週間経ってもtrunkが1.42に移行しておりませんので、
マイナーバージョンアップ版が出るかもしれませんね。
ttp://booster.x0.to/
以下更新内容の一部
[Program_options]
allow empty values in config file, Fixes #1537
[Spirit]
Spirit: moved iter_pos parser to repository, added example
Spirit: fixed token_def::what()
Spirit: Moving karma::symbols to main code base
[Format]
fixes new functions (remaining_args, expected_args, ...) in case bound.size()==0
[Regex]
Allow std::locale's to not have a messages facet installed (fixes some STLPort issues).
Allow match_results to handle singular iterators.
[Integer]
Add support for long long throughout. Fixes #653.
Update Boost.Integer meta-programming classes to work with intmax_t where possible - ie to be 64-bit clean.
[Thread]
Ensure call_once event is correctly cleaned up
A partial fix for issue #2100: use boost::throw_exception for all exceptions except thread_interrupted
Don't use timed_lock to do a lock
Added missing BOOST_THREAD_DECL for at_thread_exit_function
Using BOOST_ASSERT rather than assert
[Graph]
Changed vertex_iterator to have vertex_descriptor rather than vertices_size_type as its value type
Removed old CSR interface; fixes #3135
[Smart_ptr]
Add error checking to lwm_pthreads.hpp. Refs #2681.
Remove std::move references. Refs #3570.

亦、libs_for_build_boost.rarもICUを4.3.3にアップデート致しました。

352 名前:デフォルトの名無しさん mailto:sage [2009/12/03(木) 02:46:03 ]
intrusive_ptrのコンストラクタにexplicitがついてないのはなんでなんだぜ?
デフォルト値があるだけで、厳密には1引数じゃないから?

353 名前:デフォルトの名無しさん mailto:sage [2009/12/03(木) 03:12:25 ]
intrusive_ptr & operator=(T * rhs)
があるね

354 名前:デフォルトの名無しさん mailto:sage [2009/12/03(木) 13:33:43 ]
boostのコンパイル済み.libって、同じコンパイラでも内部で使用するクラスの実装、
たとえばSTLが違う場合(VC++で標準STLかSTLPortか)にリンクしても問題ない?
標準STLでもセキュリティ強化の#defineを指定すると実装内容が変わったりするし・・・




355 名前:デフォルトの名無しさん mailto:sage [2009/12/03(木) 17:13:48 ]
STLPortはBoostビルド時に専用のコンフィグコマンドがあるので、
問題があるかどうかは知らんけどとりあえず自前でビルドして使った方がいいと思う

356 名前:デフォルトの名無しさん mailto:sage [2009/12/04(金) 04:02:55 ]
>>353
あー、intrusive_ptrに対応してるクラスなら、
そのポインタから安全に変換できるはずだからexplicitは必要ないってことか。

357 名前:デフォルトの名無しさん mailto:sage [2009/12/04(金) 19:24:17 ]
更新しました。SVNは1.42に移行しました。
ttp://booster.x0.to/
以下更新内容の一部
[Program_options]
ProgramOptions: added a couple of missing std:: namespace qualifiers
[Spirit]
Spirit: added karma::symbols generator, updated docs, tests, and example
Spirit: removed UB in rule and token_def initialization, added copy constructor for token_def
Spirit: added karma::auto_ and related facilities, added test
Spirit: added new karma example (auto_facilities.cpp), tweaks to auto_ tests
Spirit: added auto based overloads for API functions where possible
[Serialization]
fixed BOOST_STATIC_WARNING implementation macro name conflict
Fix memory leaks in void_caster short cut memory leaks
[Uuid]
Added uuid library
Removed BOOST_STATIC_ASSERT, replaced with a static method
[Iterator]
Made sure that iterator_facade's nested ``::pointer`` type is always
the same as what's returned from operator->. For input iterators,
that wasn't always the case (see operator_arrow_proxy).Fixes #1019.
[Graph]
Fixed missing #endif
[Integer]
Change long long to boost::long_long_type etc.
Make code respect BOOST_NO_INTEGRAL_INT64_T.
[Bind]
Make mem_fn work with overloaded unary operator&. Refs #3003. Sorry it took so long.
[Exeption]
Ticket #3211

亦、libs_for_build_boost.rarもbjam.exeをrev.58011にアップデート致しました。

358 名前:デフォルトの名無しさん mailto:sage [2009/12/05(土) 14:43:24 ]
使ってないが乙

359 名前:デフォルトの名無しさん mailto:sage [2009/12/05(土) 14:45:35 ]
>>357
sankusu otsu


360 名前:デフォルトの名無しさん [2009/12/07(月) 18:00:18 ]
VS2008を使っているのですが、なぜかthreadだけリンカエラーがでます。

↓こんな感じで
1>LINK : fatal error LNK1104: ファイル 'libboost_thread-vc90-mt-sgd-1_40.lib' を開くことができません。

同じcppファイルの中でも、他のやつ(unordered_mapとか)は問題なく使えてるのに、threadだけでます。
だれか解決法を知っている方がいたらご教授を……orz

361 名前:デフォルトの名無しさん mailto:sage [2009/12/07(月) 18:03:23 ]
boostをちゃんとインストールしよう。
そのままだとヘッダだけで使えるライブラリしか使えないよ。

362 名前:デフォルトの名無しさん [2009/12/07(月) 18:47:25 ]
>>361
解決しました。

インストールはしていたのですが、どうやらライブラリのパス指定が間違っていたようです。
標準に指定されるディレクトリから変更した場合、そことは別の場所にライブラリフォルダができてしまうようで……。
コマンドプロントのメッセージを追ってたら気付くことができました……。

どうも、ありがとうございました。

363 名前:デフォルトの名無しさん mailto:sage [2009/12/08(火) 23:50:50 ]
#include <boost/spirit/utility/functor_parser.hpp>
では警告が出るから
#include <boost/spirit/include/classic_functor_parser.hpp>
を使うと、
error: expected class-name before '<' token
やらのエラーで今度はコンパイル出来ない。(#^ω^)

364 名前:デフォルトの名無しさん mailto:sage [2009/12/09(水) 00:18:19 ]
自己解決。
namespace が boost::spirit::classic になったのか。失礼した。



365 名前:デフォルトの名無しさん mailto:sage [2009/12/09(水) 06:37:45 ]
ここにもspiritの罠に引っかかった生け贄が一人いたか。

俺もだ。

366 名前:デフォルトの名無しさん mailto:sage [2009/12/10(木) 04:16:08 ]
コンテナフレームワークライブラリはどこですか?

367 名前:デフォルトの名無しさん [2009/12/11(金) 13:19:19 ]
threadとbindでメンバ関数で引数を取る場合、どんな感じで使えばいいのでしょうか……?

たとえばこんなふうに
class Hoge{
public:
  void run();
void fanc(int x, int y);
}

Hoge tmp;
thread thr_tmp(bind(&Hoge::run, &tmp));

runが引数を取らないメンバ関数ならこれで動きますが、
メンバ関数が引数を取る場合(上の例だとfancを実行する場合)はどのようにすればいいのでしょうか?

自分で色々調べてためしてみましがた、尽くコンパイルエラーがでます……orz

368 名前:デフォルトの名無しさん mailto:sage [2009/12/11(金) 14:00:00 ]
boost::thread thr_tmp(boost::bind(&Hoge::fanc, &tmp, 10, 20));

でx=10, y=20になるが

あとfancじゃなくてfuncではなかろうか

369 名前:デフォルトの名無しさん mailto:sage [2009/12/11(金) 14:02:12 ]
368はVC++2008ね。
上記でだめならコンパイラ依存問題かも

370 名前:デフォルトの名無しさん mailto:sage [2009/12/11(金) 14:19:44 ]
>>368
解決しました。
ありがとうございました!

371 名前:デフォルトの名無しさん mailto:sage [2009/12/12(土) 09:02:35 ]
fack youのコピペ思い出した。

372 名前:デフォルトの名無しさん mailto:sage [2009/12/12(土) 10:10:20 ]
仲良くなった。

373 名前:デフォルトの名無しさん mailto:sage [2009/12/13(日) 09:58:14 ]
Boost 1.40 + VC++2008 にて

#include <boost/serialization/static_warning.hpp>
template<typename T>
struct hoge {
    static int const i = 100;
    static bool const b = i < 0;
    BOOST_STATIC_WARNING(b);
};
typedef hoge<int> hoge_t;
hoge_t h;

hoge がテンプレートだと BOOST_STATIC_WARNING が働かない。(警告が出ない)
hoge が非テンプレート(ただの struct )だと意図通り警告が出る。
BOOST_STATIC_WARNING 以外でも、boost::mpl::print などでも同様。

374 名前:デフォルトの名無しさん mailto:sage [2009/12/13(日) 10:23:51 ]
struct hoge {
 static int const i = 100;
 static bool const b = i < 0;
 hoge() { BOOST_STATIC_WARNING(b); };
};

これでどうだろう



375 名前:デフォルトの名無しさん mailto:sage [2009/12/14(月) 00:16:47 ]
勉強会のshared_ptrの発表聞きたいんだけど「えっと」が強烈に心を折りにくる。

376 名前:デフォルトの名無しさん mailto:sage [2009/12/14(月) 00:23:33 ]
しばらく聞いてたら慣れたよw






[ 続きを読む ] / [ 携帯版 ]

前100 次100 最新50 [ このスレをブックマーク! 携帯に送る ] 2chのread.cgiへ
[+板 最近立ったスレ&熱いスレ一覧 : +板 最近立ったスレ/記者別一覧]( ´∀`)<199KB

read.cgi ver5.27 [feat.BBS2 +1.6] / e.0.2 (02/09/03) / eucaly.net products.
担当:undef