Am 21.10.2010 12:46, schrieb Mateusz Loskot: > On 21/10/10 10:26, Henning Basold wrote: >> Am 20.10.2010 19:02, schrieb Mateusz Loskot: >>> On 20/10/10 17:08, Henning Basold wrote: >>>> Hi, >>>> >>>> I've attached a patch which enables SOCI to supporte all Boost.Fusion >>>> sequence types and not just fusion::vector. It is a relativ simple >>>> patch. But it needs a small change (not breaking) in the >>>> type_conversion interface. Maybe this can be worked around if needed. >>>> >>>> I would like to see this integrated into SOCI because it makes >>>> adaption of UDT more convenient and also enables adaption of types >>>> like std::pair just by including the appropriate Fusion headers. >>> >>> Hi Henning, >>> >>> First of all, thank you very much for the patch. >>> >>> Did you generated it using git format-patch utility? >>> I'm having problems with applying it, it looks suspicious to me. >>> >>> Best regards, >> >> Hi, >> >> sorry for multiple postings. > > No problem, thanks for the contributions! You're welcome! :) > >> But I thought there should be a test case >> and some documentation about it. So I amended this to the patch (see >> attachment). I don't know how you write the documentation, so I just >> hacked it into the HTML document. > > I'll take a look soonly. > >> The integration of arbitrary fusion sequences works by using SFINAE (the >> new parameter to type_conversion). A specialization of type_conversion >> is then enabled iff the parameter T models a fusion sequence. Then this >> specialization just passes the parameter through to a conversion struct >> which uses the correct number of entries in the passed sequence. The >> same technique is used within Boost.Spirit. >> Hope that is clear. > > Yes, it is clear. > Generally, I like the idea of extending the support to other fusion > containers and I'd like to integrate it. > > Yesterday, I tried to compile it and add some tests, but GCC 4.4 > reported some compilation errors. > It was late night, so I didn't try to investigate it. > I will continue tonight. Mh, that's strange. I compiled it here with GCC 4.4.3 and at work with MSVC 2008. Did you compile the tests or something else? > > Here is your patch committed: > > http://soci.git.sourceforge.net/git/gitweb.cgi?p=soci/soci;a=commit;h=80642eac33a99a683a6f4db76d173178fb5935b1 > > > > I reverted until I have it working: > > http://soci.git.sourceforge.net/git/gitweb.cgi?p=soci/soci;a=commit;h=5f8871b1099b78bb67ed7c3c39bff37058ef9e9c > > > > Best regards, That simpilfies my life a bit ;)
Regards ------------------------------------------------------------------------------ Nokia and AT&T present the 2010 Calling All Innovators-North America contest Create new apps & games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev _______________________________________________ Soci-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/soci-users
