Compare commits

...

12 Commits

Author SHA1 Message Date
2fbbbcb58b This commit was manufactured by cvs2svn to create tag 'RC_1_30_2'.
[SVN r19443]
2003-08-04 17:55:28 +00:00
721390991a This commit was manufactured by cvs2svn to create branch 'RC_1_30_0'.
[SVN r17693]
2003-03-01 19:43:06 +00:00
3daa34744f Added copyright
[SVN r17183]
2003-02-04 07:21:29 +00:00
0f3969f9e0 Add /libs/lib-name to comment
[SVN r16685]
2002-12-23 02:43:12 +00:00
c501468b53 Fixed reverse iterator workaround test, should now work with Intel C++ as well as VC7.
[SVN r16195]
2002-11-11 12:40:56 +00:00
faf0005e86 Added BOOST_DINKUMWARE_STDLIB macro
[SVN r16172]
2002-11-09 11:54:05 +00:00
785e98fcac No sense in failing just because a compiler doesn't implement correct for loop scoping!
[SVN r15327]
2002-09-15 04:04:10 +00:00
13d4e8bc40 Stripped tabs, added VC7+STLport fixes
[SVN r15193]
2002-09-07 10:45:04 +00:00
9ea2182afa One more attempt to get Intel config right.
[SVN r15166]
2002-09-05 10:18:10 +00:00
bf3b240686 Second try at fixing Intel errors, without messing up Intel+STLport config.
[SVN r15141]
2002-09-03 11:34:12 +00:00
6b9c6c9de3 Added (hopeful) Intel C++ fixes for broken std::reverse_iterator.
[SVN r15124]
2002-09-01 10:43:04 +00:00
fe013c42b7 Added a fix for non Microsoft compilers using Microsoft libraries.
[SVN r15068]
2002-08-23 14:32:39 +00:00
6 changed files with 49 additions and 6 deletions

View File

@ -1,9 +1,16 @@
/* simple example for using class array<>
*
* (C) Copyright Nicolai M. Josuttis 2001.
* Permission to copy, use, modify, sell and distribute this software
* is granted provided this copyright notice appears in all copies.
* This software is provided "as is" without express or implied
* warranty, and with no claim as to its suitability for any purpose.
*
* Changelog:
* 20 Jan 2001 - Removed boolalpha use since stock GCC doesn't support it
* (David Abrahams)
*/
#include <iostream>
#include <boost/array.hpp>

View File

@ -1,5 +1,11 @@
/* example for using class array<>
* (C) Copyright Nicolai M. Josuttis 2001.
* Permission to copy, use, modify, sell and distribute this software
* is granted provided this copyright notice appears in all copies.
* This software is provided "as is" without express or implied
* warranty, and with no claim as to its suitability for any purpose.
*/
#include <algorithm>
#include <functional>
#include <boost/array.hpp>

View File

@ -1,5 +1,11 @@
/* example for using class array<>
* (C) Copyright Nicolai M. Josuttis 2001.
* Permission to copy, use, modify, sell and distribute this software
* is granted provided this copyright notice appears in all copies.
* This software is provided "as is" without express or implied
* warranty, and with no claim as to its suitability for any purpose.
*/
#include <string>
#include <iostream>
#include <boost/array.hpp>

View File

@ -1,5 +1,11 @@
/* example for using class array<>
* (C) Copyright Nicolai M. Josuttis 2001.
* Permission to copy, use, modify, sell and distribute this software
* is granted provided this copyright notice appears in all copies.
* This software is provided "as is" without express or implied
* warranty, and with no claim as to its suitability for any purpose.
*/
#include <algorithm>
#include <functional>
#include <string>

View File

@ -1,5 +1,11 @@
/* simple example for using class array<>
* (C) Copyright Nicolai M. Josuttis 2001.
* Permission to copy, use, modify, sell and distribute this software
* is granted provided this copyright notice appears in all copies.
* This software is provided "as is" without express or implied
* warranty, and with no claim as to its suitability for any purpose.
*/
#include <iostream>
#include <boost/array.hpp>
@ -10,8 +16,8 @@ void test_static_size (const T& cont)
for (unsigned i=0; i<T::static_size; ++i) {
tmp[i] = int(cont[i]);
}
for (unsigned i=0; i<T::static_size; ++i) {
std::cout << tmp[i] << ' ';
for (unsigned j=0; j<T::static_size; ++j) {
std::cout << tmp[j] << ' ';
}
std::cout << std::endl;
}

View File

@ -11,16 +11,22 @@
* This software is provided "as is" without express or implied
* warranty, and with no claim as to its suitability for any purpose.
*
* 23 Aug 2002 - fix for Non-MSVC compilers combined with MSVC libraries.
* 05 Aug 2001 - minor update (Nico Josuttis)
* 20 Jan 2001 - STLport fix (Beman Dawes)
* 29 Sep 2000 - Initial Revision (Nico Josuttis)
*/
// See http://www.boost.org/libs/array for Documentation.
#ifndef BOOST_ARRAY_HPP
#define BOOST_ARRAY_HPP
#include <cstddef>
#include <stdexcept>
#include <iterator>
// Handles broken standard libraries better than <iterator>
#include <boost/detail/iterator.hpp>
#include <algorithm>
// FIXES for broken compilers
@ -50,15 +56,15 @@ namespace boost {
const_iterator end() const { return elems+N; }
// reverse iterator support
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_MSVC_STD_ITERATOR)
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_MSVC_STD_ITERATOR) && !defined(BOOST_NO_STD_ITERATOR_TRAITS)
typedef std::reverse_iterator<iterator> reverse_iterator;
typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
#elif defined(BOOST_MSVC) && (BOOST_MSVC == 1300)
#elif defined(_MSC_VER) && (_MSC_VER == 1300) && defined(BOOST_DINKUMWARE_STDLIB) && (BOOST_DINKUMWARE_STDLIB == 310)
// workaround for broken reverse_iterator in VC7
typedef std::reverse_iterator<std::_Ptrit<value_type, difference_type, iterator,
reference, iterator, reference> > reverse_iterator;
typedef std::reverse_iterator<std::_Ptrit<value_type, difference_type, const_iterator,
const_reference, iterator, reference> > const_reverse_iterator;
const_reference, iterator, reference> > const_reverse_iterator;
#else
// workaround for broken reverse_iterator implementations
typedef std::reverse_iterator<iterator,T> reverse_iterator;
@ -161,3 +167,9 @@ namespace boost {
#endif /*BOOST_ARRAY_HPP*/