Boost総合スレ part10 (385レス)
Boost総合スレ part10 http://mevius.5ch.net/test/read.cgi/tech/1347611669/
上
下
前次
1-
新
通常表示
512バイト分割
レス栞
抽出解除
必死チェッカー(本家)
(べ)
自ID
レス栞
あぼーん
リロード規制
です。10分ほどで解除するので、
他のブラウザ
へ避難してください。
218: デフォルトの名無しさん [sage] 2014/10/30(木) 00:07:58.69 ID:lLBGJ4gC >>214,217 いまさらだがわかった範囲で言っておくと Inherited attributes に対する条件には ttp://www.boost.org/doc/libs/1_56_0/libs/spirit/doc/html/spirit/qi/reference/basics.html の > Some parsers (e.g. primitives and non-terminals) may take in additional attributes. Such parsers take the form: > p(a1, a2,..., aN) > where p is a parser. Each of the arguments (a1 ... aN) can either be an immediate value, or a function, f, with signature: > T f(Unused, Context) > where T, the function's return value, is compatible with the argument type expected and Context is the parser's Context type > (The first argument is unused to make the Context the second argument. This is done for uniformity with Semantic Actions). があって その immediate value の判定は boost::is_scalar か boost::spirit::traits::is_string のどちらかが真であるかで判定されてる。 けれど MyStruct はそのどちらにも該当しないので immediate value ではなくもちろん関数でもないから条件を満たさずエラーになる >>217でやったように phoenix の val, ref でラップすれば function, f のほうで条件を満たすことができるのでエラーにはならない ということだと思う http://mevius.5ch.net/test/read.cgi/tech/1347611669/218
メモ帳
(0/65535文字)
上
下
前次
1-
新
書
関
写
板
覧
索
設
栞
歴
スレ情報
赤レス抽出
画像レス抽出
歴の未読スレ
Google検索
Wikipedia
ぬこの手
ぬこTOP
0.013s