Curl wrapper round two
jdrewsen
jdrewsen at nospam.com
Sun Jun 19 10:34:39 PDT 2011
Den 19-06-2011 13:26, Max Klyga skrev:
> On 2011-06-19 12:44:57 +0300, jdrewsen said:
>
>> Den 19-06-2011 11:12, Johannes Pfau skrev:
>>> Jimmy Cao wrote:
>>>> Also, why the bool dummy argument in the Curl struct constructor?
>>>>
>>>
>>> I guess that's because structs can't have default constructors. Is
>>> there a better solution to this problem?
>>
>> That is why yes. I could just make a static "create()" function
>> instead, but I went for this model. I would very much like to know a
>> better solution.
>
> Declare static opCall and then to instatiate:
> auto foo = Bar();
> But the user must remember to initialize variables properly.
>
Thanks.
I guess that I can initialize variables in the opCall and that way the
user should not have to remember to initialize variables?
/Jonas
More information about the Digitalmars-d
mailing list