|
Boost : |
From: Robert Ramey (ramey_at_[hidden])
Date: 2006-05-21 19:01:03
David Abrahams wrote:
>> In my work on eliminating header ordering issues, I discovered the
>> need for the enclosed patch. This is not a subtle issue; it seems to
>> me that the trunk is very broken without it.
Hmmm - that's not obvious to me. All of the archives classes
which invoke this template depend on any kind of default.
Also, I (the) key motivation for the last changes to binary_?archive
implementon were to make it not dependent on streams but
rather on the streambuf. streams implementations use a mutex
to lock the buffer on every operation. I felt this was bad for
performance. Also we weren't using any of the functionality
of stream so it made sense to re-implement binary_?archive
without it.
Including these defaults suggests that there is a relationship
between binary_?archive and std::stream - when in in fact there
is none. With 1.34, binary_?archives can be constructed
without streams at all - although the old constructor is
still in there to maintain compatibility with other programs
(older binary_?archive users and other archive users).
So, I believe that there should be no default in this case.
Robert Ramey
>
>> Index: boost/archive/binary_oarchive_impl.hpp
>> ===================================================================
>> RCS file:
>> /cvsroot/boost/boost/boost/archive/binary_oarchive_impl.hpp,v
>> retrieving revision 1.1
>> diff -b -d -u -r1.1 binary_oarchive_impl.hpp
>> --- boost/archive/binary_oarchive_impl.hpp 4 Feb 2006 20:37:12 -0000
>> 1.1 +++ boost/archive/binary_oarchive_impl.hpp 21 May 2006 22:24:42
>> -0000 @@ -24,7 +24,7 @@
>> namespace boost {
>> namespace archive {
>>
>> -template<class Archive, class Elem, class Tr>
>> +template<class Archive, class Elem = std::istream::char_type, class
>> Tr = std::istream::traits_type> class binary_oarchive_impl :
>> public basic_binary_oprimitive<Archive, Elem, Tr>,
>> public basic_binary_oarchive<Archive>
>> Index: boost/archive/binary_iarchive_impl.hpp
>> ===================================================================
>> RCS file:
>> /cvsroot/boost/boost/boost/archive/binary_iarchive_impl.hpp,v
>> retrieving revision 1.1
>> diff -b -d -u -r1.1 binary_iarchive_impl.hpp
>> --- boost/archive/binary_iarchive_impl.hpp 4 Feb 2006 20:37:12 -0000
>> 1.1 +++ boost/archive/binary_iarchive_impl.hpp 21 May 2006 22:24:42
>> -0000 @@ -24,7 +24,7 @@
>> namespace boost {
>> namespace archive {
>>
>> -template<class Archive, class Elem, class Tr>
>> +template<class Archive, class Elem = std::istream::char_type, class
>> Tr = std::istream::traits_type> class binary_iarchive_impl :
>> public basic_binary_iprimitive<Archive, Elem, Tr>,
>> public basic_binary_iarchive<Archive>
>>
>
>
>
>>
>> --
>> Dave Abrahams
>> Boost Consulting
>> www.boost-consulting.com
>>
>
>
>
>> _______________________________________________
>> Unsubscribe & other changes:
>> http://lists.boost.org/mailman/listinfo.cgi/boost
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk