|
Boost : |
From: David Abrahams (dave_at_[hidden])
Date: 2005-09-08 18:25:22
Robert,
I'm wondering what happened to these threads. Do you understand what
I'm saying? Do you think I still don't understand what's going on?
David Abrahams <dave_at_[hidden]> writes:
> "Robert Ramey" <ramey_at_[hidden]> writes:
>
>>> 3. In that reference section, '&' is used repeatedly where only '>>'
>>> is appropriate. For example:
>>>
>>> main(){
>>> ...
>>> base *b;
>>> ar & b;
>>> }
>>>
>>> That can only be confusing.
>>
>> Hmm - I checked that section and maybe it is confusing but not in the way
>> it seems.
>>
>> the registration or export must be done on BOTH saving and loading of
>> archives.
>
> It doesn't matter, since saving through an unitialized pointer causes
> undefined behavior. That code can only work for loading.
>
> --
> Dave Abrahams
> Boost Consulting
> www.boost-consulting.com
>
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
>
David Abrahams <dave_at_[hidden]> writes:
> "Robert Ramey" <ramey_at_[hidden]> writes:
>
>>> 3. In that reference section, '&' is used repeatedly where only '>>'
>>> is appropriate. For example:
>>>
>>> main(){
>>> ...
>>> base *b;
>>> ar & b;
>>> }
>>>
>>> That can only be confusing.
>>
>> Hmm - I checked that section and maybe it is confusing but not in the way
>> it seems.
>>
>> the registration or export must be done on BOTH saving and loading of
>> archives. It just occurred to me that this might not be obvious. My usage
>> of & rather than << or >> reflects that examples such as the above use ...
>> to replace code which creates and archive instance "ar" which could either
>> be in input and /or output archive. I would be reluctant to replace the &
>> above with << as it would suggest that << would be OK when it wouldn't be in
>> all the cases where the example is applicable.
>
> Um, I never suggested '<<'. Only '>>' is appropriate here.
>
> --
> Dave Abrahams
> Boost Consulting
> www.boost-consulting.com
>
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
>
David Abrahams <dave_at_[hidden]> writes:
> "Robert Ramey" <ramey_at_[hidden]> writes:
>
>>> IMO you'd be better off simply leaving out "template" on those
>>> compilers, if you can get away with it.
>>>
>>> ar.register_type<T>()
>>
>> If I remember correctly, that's what I started out with.
>
> Won't the CVS history tell you for sure?
>
>> I had to do what I did in order to get all compilers to accept it.
>
> I understand why you need template on _real_ C++ compilers;
> I also know that vc6 requires that you get all explicit function args
> into real function args, to avoid link errors, so as long as you write
>
> register_type(T * t = NULL);
>
> in the declaration you can still call
>
> ar.register_type<T>()
>
> I've never heard of one that won't accept the above syntax no matter
> what you do.
>
> Anyway, workaround hacks should be kept out of the specification of
> requiremeents for a concept, except as a footnote.
>
> --
> Dave Abrahams
> Boost Consulting
> www.boost-consulting.com
>
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
>
-- Dave Abrahams Boost Consulting www.boost-consulting.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk