Re: Linking error when changing > to >>
Larry Evans <[email protected]>
| Newsgroups | gmane.comp.parsers.spirit.general |
|---|---|
| Message-ID | <[email protected]> |
On 11/14/2016 12:16 PM, Larry Evans wrote: > On 11/12/2016 04:14 PM, Seth wrote: >> On 11-11-16 21:06, Exagon wrote: >>> So I think it has something to do with the type parser. >>> Maybe I did something wrong, please correct me if I did anything anywhere in >>> this example I shouldnt do when using boost spirit x3. >>> I spoke to Joel before to ask whether I could expect such a behaviour in >>> spirit x3 and he said no, so I think this is a bug. >> >> FWIW I tried to look into this with the bag-of-tricks I know for this >> >> * It's not about attribute synthesis AFAICT (using semantic actions to >> sense the synthesized attributes confirms identical types). >> >> The linker error indicates that it is trying to invoke the `type` rule >> with the attribute bound to a fusion iterator, instead of the actual >> object. It's interesting that this works when compiling single-TU. > > By single-TU, do you mean just compiling&linking a main.cpp > which #include's the .cpp files instead of just "example.hpp"? > > Unfortunately, I tried that; however, I got link error as indicated > here: > > > https://github.com/cppljevans/linker_error_example/commit/85a163e468ebcfe47994cbab64a9cca453030f48 > > Could you please give me a hit about what I'm doing wrong? > OOPS. Made an error, the correct log entry is: https://github.com/cppljevans/linker_error_example/commit/0ac0a3d8bb1e522df7a1640e92db41591a15ad51 Since then, I've modified types.cpp to contain an explicit specialization of parse_rule, and with that, the link succeeds: https://github.com/cppljevans/linker_error_example/commit/a6818268ae1c5b90def71c72488194c8ff618451 So, is the specialization now in types.cpp the type of `explicit specialization` you mentioned in your earlier post here?: http://boost.2283326.n4.nabble.com/Linking-error-when-changing-gt-to-gt-gt-tt4689820.html#none ------------------------------------------------------------------------------