On Fri, May 1, 2009 at 1:31 PM, Jeremy Orlow <jor...@chromium.org> wrote:

> On Fri, May 1, 2009 at 1:27 PM, Adam Langley <a...@chromium.org> wrote:
>
>> On Fri, May 1, 2009 at 12:53 PM, Jeremy Orlow <jor...@google.com> wrote:
>> > I'm still kind of new here, so forgive me if this is a silly question,
>> but
>> > why do this with a define and not an template function?
>>
>> One could imagine a template function:
>>
>> template<typename T>
>> T handle_eintr(T &a) {
>>   ..
>> }
>>
>> But when using it as:
>>
>> handle_eintr(close(fd));
>>
>> How would one trigger close(fd) to be possibly evalulated multiple
>> times? I think that's the one thing which precludes a template
>> function sadly.
>
>
Creating a set of templates isn't too bad.  Looking through the list of
functions agl sent, sendto and recvfrom take hte most arguments, at 6.

IOCtl will be annoying though cause of the vararg.

-Albert

--~--~---------~--~----~------------~-------~--~----~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
    http://groups.google.com/group/chromium-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to