mirror of
https://github.com/boostorg/array.git
synced 2025-07-01 15:01:05 +02:00
Compare commits
1 Commits
boost-1.21
...
boost-1.20
Author | SHA1 | Date | |
---|---|---|---|
d8163dee74 |
@ -277,7 +277,7 @@
|
||||
<li><font face="Arial, Helvetica, sans-serif">
|
||||
<a href="array.hpp.html">as HTML file</a></font></li>
|
||||
<li><font face="Arial, Helvetica, sans-serif">
|
||||
<a href="../../boost/array.hpp">as plain file</a></font></li>
|
||||
<a href="array.hpp">as plain file</a></font></li>
|
||||
<p> <font face="Arial, Helvetica, sans-serif">Simple Example for using <font face="Courier New, Courier, mono">array<><font face="Arial, Helvetica, sans-serif">:</font></font></font>
|
||||
<li><font face="Arial, Helvetica, sans-serif">
|
||||
<a href="array1.cpp.html">as HTML file</a></font> </li>
|
||||
|
@ -1,8 +1,4 @@
|
||||
/* simple example for using class array<>
|
||||
*
|
||||
* Changelog:
|
||||
* 20 Jan 2001 - Removed boolalpha use since stock GCC doesn't support it
|
||||
* (David Abrahams)
|
||||
*/
|
||||
#include <iostream>
|
||||
#include <boost/array.hpp>
|
||||
@ -22,7 +18,7 @@ int main()
|
||||
|
||||
// use some common STL container operations
|
||||
std::cout << "size: " << a.size() << std::endl;
|
||||
std::cout << "empty: " << (a.empty() ? "true" : "false") << std::endl;
|
||||
std::cout << "empty: " << std::boolalpha << a.empty() << std::endl;
|
||||
std::cout << "max_size: " << a.max_size() << std::endl;
|
||||
std::cout << "front: " << a.front() << std::endl;
|
||||
std::cout << "back: " << a.back() << std::endl;
|
||||
|
@ -11,8 +11,7 @@
|
||||
* This software is provided "as is" without express or implied
|
||||
* warranty, and with no claim as to its suitability for any purpose.
|
||||
*
|
||||
* 20 Jan 2001 - STLport fix (Beman Dawes)
|
||||
* 29 Sep 2000 - Initial Revision (Nico Josuttis)
|
||||
* Sep 29, 2000
|
||||
*/
|
||||
#ifndef BOOST_ARRAY_HPP
|
||||
#define BOOST_ARRAY_HPP
|
||||
@ -49,11 +48,11 @@ 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)
|
||||
typedef std::reverse_iterator<iterator> reverse_iterator;
|
||||
typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
|
||||
#else
|
||||
// workaround for broken reverse_iterator implementations
|
||||
// workaround for broken reverse_iterator implementations due to no partial specialization
|
||||
typedef std::reverse_iterator<iterator,T> reverse_iterator;
|
||||
typedef std::reverse_iterator<const_iterator,T> const_reverse_iterator;
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user