From: Dean M. B. <mik...@gm...> - 2009-08-21 15:08:07
|
On Fri, Aug 21, 2009 at 10:59 PM, Kim Gräsman<kim...@gm...> wrote: [snip] > >> My approach is almost different from any approach that I've seen taken >> as far as URL parsing is concerned -- using template functions and >> template classes and a generic programming approach to specific URL >> parsing. However mine is not as close to the RFC as I'd like, and is >> not as well tested as I'd like either. >> >> Can us three gentlemen work together towards: 1) Adding better test >> coverage 2) Implementing the details of the RFC and 3) Merging what we >> can towards something that works and is release-ready? > > I'd love to help with the tests, but we've just had our second child > and life with two kids doesn't leave much time for hacking :-) Let me > see if I can help out, but don't count on it. > I understand -- I'm actually on the way to becoming a father myself this November so I'm actually trying to get as much open source programming time now before my first baby arrives. :D It would be great to see you contributing to the testing and even the implementation again. :) > Quick question -- parse_specific seems to be a function template that > you specialize on the Range and Tag. I thought specializing function > templates was frowned upon, e.g. [1]...? Plus, as I understand it, you > can't partially specialize it (reuse code parsers for one Range over > several Tags). Can't you use simple overloading to get the same > result? I can't claim to understand it in detail, I just browsed the > code quickly, but this jumped out at me. > Yes, I was actually struggling with this one -- if I go about it through the overloading route, it would look something like this: template <class Range> bool parse_specific(Range & range, tags::default_); template <class Range> bool parse_specific(Range & range, tags::http); Which I think would work and would be worth a shot implementing. The call to parse_specific then would look like: parse_specific(range, Tag()); In parse_url. If you can make the changes and make sure the tests pass, that would be super. :) > Thanks, You're welcome, and thank you for pointing out a better way at approaching parse_specific. :D -- Dean Michael Berris blog.cplusplus-soup.com | twitter.com/mikhailberis linkedin.com/in/mikhailberis | facebook.com/dean.berris | deanberris.com |