|
Boost Users : |
Subject: Re: [Boost-users] [netlib] throwing exceptions with http_client.cpp
From: Joel de Guzman (joel_at_[hidden])
Date: 2010-11-19 03:14:36
On 11/19/2010 3:25 PM, Dean Michael Berris wrote:
> On Fri, Nov 19, 2010 at 3:11 PM, Joel de Guzman
> <joel_at_[hidden]> wrote:
>> On 11/19/2010 12:10 PM, Dean Michael Berris wrote:
>>>
>>> On Fri, Nov 19, 2010 at 3:22 AM, Christian Henning<chhenning_at_[hidden]>
>>>>
>>>> I'm sure this idea already came up but why not let the user have the
>>>> option of making parts of netlib compile into a lib?
>>>>
>>>
>>> Yes, it's already come up. ;) The real reason is because I don't see
>>> which parts of cpp-netlib can be moved into a compiled lib. Most -- I
>>> should say "all" -- of the algorithms I implement is generic. Maybe
>>> later on I can do that, but only once I see which parts can be moved
>>> to a compiled lib. :D
>>>
>>> Also, I aimed to do it header-only, which I think I've largely
>>> succeeded in doing now. Going the other way looks really hard from
>>> where I'm sitting. :D
>>
>> A good way to start is by separating the implementation files from
>> interface files such that the user can include the interface files
>> from headers and the implementation files from cpp plus template
>> instantiations with the client's actual template types.
>>
>
> Interesting. This sound like a lot of work though.
>
> My problem is that a lot of the types are determined through template
> metafunctions. I don't have many opaque types lying around that I can
> move the implementations of to compilable files. I also have a ton of
> template functions that are marked 'inline' to avoid ORD violations
> when compiling/linking.
>
> Also, providing the template specializations myself sound like a
> really bad nightmare. If I didn't aim to support for example a means
> of supporting std::string, std::wstring, std::vector<char>, CString,
> QString, and<insert-string-implementation-here> in the messages, I
> might be able to move implementations over and just support
> std::string all throughout the library.
I'm sure you can find ways around these (I'd say) trivial
problems with some bits of imagination ;-) I can offer a
detailed solution, but I don't want to spoil the fun :-P
Hesitation is your main obstacle, I would say.
Regards,
-- Joel de Guzman http://www.boostpro.com http://spirit.sf.net
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net