cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curlpp mailing list Archives

Re: [cURLpp] CurlHandle.inl

From: Jean-Philippe Barette-LaPierre <jpbarrette_at_gmail.com>
Date: Thu, 27 Nov 2008 08:51:38 -0500

I think you miss something very important: function (or member function)
templates are only instantiated IF you use them.

On Wed, Nov 26, 2008 at 6:31 PM, Piotr Dobrogost <curlpp_at_2008.autoera.pl>wrote:

>
> Jean
>
> Jean-Philippe Barette-LaPierre wrote:
> >
> >
> > On Sat, Nov 15, 2008 at 2:01 PM, Piotr Dobrogost <curlpp_at_2008.autoera.pl
> > <mailto:curlpp_at_2008.autoera.pl>> wrote:
> >
> > Jean
> >
> > In CurlHandle.inl we have this
> >
> > template< typename OptionType >
> > void
> > cURLpp::CurlHandle::option(CURLoption optionType,
> > OptionType value)
> > {
> > CURLcode code;
> > code = curl_easy_setopt(mCurl, optionType, value);
> > libcurlRuntimeAssert(mErrorBuffer, code);
> > }
> >
> > template< typename OptionType, CURLoption optionType >
> > void
> > cURLpp::CurlHandle::option(OptionType value)
> > {
> > option(optionType, value);
> > }
> >
> >
> > So there are as many option functions as there are many OptionType
> > types. Do we really need this?
> >
> >
> > I don't see your point here. Can you elaborate more?
>
> Why do we need the second overload of option method above? Giving
> CURLoption as a template argument in the second overload creats as many
> option methods as there are many CURLoption values. In the body of the
> second option method optionType argument of template is only forwared as the
> first argument of the first overload of option method.
> Why do we need
>
> option<bool, CURL_some_option>(bool)
> and
> option<bool, CURL_some_other_option>(bool)
> etc.
> ?
>
> Regards
> Piotr Dobrogost
> _______________________________________________
> cURLpp mailing list
> cURLpp_at_rrette.com
> http://www.rrette.com/mailman/listinfo/curlpp
>

_______________________________________________
cURLpp mailing list
cURLpp_at_rrette.com
http://www.rrette.com/mailman/listinfo/curlpp
Received on 2008-11-27

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET