Boost logo

Boost :

From: Beman Dawes (beman_at_[hidden])
Date: 2000-08-30 09:43:39

Nicolai Josuttis wrote:

>Attached is an updated version of array<>.
>According to requests to my last submission it has the following
> - rangecheck() is static and private
> - global swap() has non-const args
> - template assignment operator added
> - assign() for a sinlg value added
> - array5.cpp changed to check new features.
> - documentation updates refelcting issues above


* Once the web site is updated, please update your copy of array.html; I
had to fix several broken links, and remove the reference to the local .zip
(which we no longer include for each separate library.)

* There were new compile errors on the boost regression of array1.cpp. I
made two sets of fixes.

First, to workaround VC++ broken std::reverse_iterator:

         // reverse iterator support
# if !defined(BOOST_MSVC) || BOOST_MSVC > 1200 // 1200 == VC++ 6.0
         typedef std::reverse_iterator<iterator> reverse_iterator;
         typedef std::reverse_iterator<const_iterator>
# else
         // workaround for broken VC++ reverse_iterator implementation
         typedef std::reverse_iterator<iterator,T> reverse_iterator;
         typedef std::reverse_iterator<const_iterator,T>
# endif

Second, both Borland and Microsoft compilers are rejecting brace
initialization because the added private member means the class is now
non-aggregate. Here is the temporary fix I applied:

// private: // not allowed to brace initialization a non-aggregate class

I am assuming the long term fix is just to remove the line.

After these changes, array1.cpp now compiles for Borland, Metrowerks, and
Microsoft compilers.

Unless I hear differently from you, I will permanently add these changes.


Boost list run by bdawes at, gregod at, cpdaniel at, john at