Compare commits

..

25 Commits

Author SHA1 Message Date
Beman Dawes 30465bdb87 v2, v3, integration branch
[SVN r62649]
2010-06-09 11:34:33 +00:00
Marshall Clow 64e5394540 Added get_c_array to Boost.Array
[SVN r62487]
2010-06-06 16:05:13 +00:00
Marshall Clow c37498364e Detab array.hpp
[SVN r61415]
2010-04-19 21:41:21 +00:00
Marshall Clow 5e81100035 Added support for SunCC and 'fill' operation; tickets #3893 and #3168 respectively
[SVN r60436]
2010-03-10 18:03:30 +00:00
Marshall Clow 79cadb97d7 Changed exception throwing to use boost::throw_exception
[SVN r60417]
2010-03-10 14:23:49 +00:00
Marshall Clow 9609395af0 Applied patches to fix #2886
[SVN r59476]
2010-02-04 18:22:13 +00:00
John Maddock fb72e72640 MSVC warning suppression - fixes #3599.
[SVN r59439]
2010-02-03 12:10:56 +00:00
Troy D. Straszheim e875287d55 rm cmake from trunk. I'm not entirely sure this is necessary to satisfy the inspect script, but I'm not taking any chances, and it is easy to put back
[SVN r56942]
2009-10-17 02:07:38 +00:00
Troy D. Straszheim 100b5d687b Copyrights on CMakeLists.txt to keep them from clogging up the inspect
reports.  This is essentially the same commit as r55095 on the release
branch.



[SVN r55159]
2009-07-26 00:49:56 +00:00
Thorsten Jørgen Ottosen 7fb9412ea8 removed warning on vc++ for using std::equal
[SVN r54541]
2009-06-30 20:04:45 +00:00
Steven Watanabe 471bc9bf06 Supress warnings in array
[SVN r53105]
2009-05-19 03:00:53 +00:00
Steven Watanabe 9cf5e0c9a1 Use boost::swap instead of std::swap_ranges to enable ADL. Fixes #2753.
[SVN r53104]
2009-05-19 02:37:04 +00:00
Michael A. Jackson d2910e195a Updating dependency information for modularized libraries.
[SVN r49628]
2008-11-07 17:05:27 +00:00
Michael A. Jackson b3ace9fb6e Updating CMake files to latest trunk. Added dependency information for regression tests and a few new macros for internal use.
[SVN r49627]
2008-11-07 17:02:56 +00:00
Michael A. Jackson a6b531b5b1 Continuing merge of CMake build system files into trunk with the encouragement of Doug Gregor
[SVN r49510]
2008-11-01 13:15:41 +00:00
Rene Rivera 9804292dad Move array test into canonical test subdir structure.
[SVN r44376]
2008-04-13 22:12:12 +00:00
Beman Dawes 069b5e2ca1 Throw out_of_range rather than range_error. See 21.1.1 paragraph 13.
[SVN r36304]
2006-12-08 16:54:30 +00:00
Beman Dawes 526953fc5e Test for out_of_range rather than range_error. See 21.1.1 paragraph 13.
[SVN r36303]
2006-12-08 16:53:49 +00:00
Andreas Huber b06f12b0b7 Fixed license & copyright issues.
[SVN r36224]
2006-12-01 10:29:49 +00:00
Beman Dawes f0bbb8b211 Add copyright, license
[SVN r35905]
2006-11-07 19:11:57 +00:00
Gennaro Prota d7a5408143 http://www.josuttis.com/ hasn't the latest version any more
[SVN r34855]
2006-08-08 18:49:30 +00:00
John Maddock 564e4029d0 Simplified code.
[SVN r34384]
2006-06-24 11:31:19 +00:00
John Maddock 0dc11c2f23 Fix compiler errors resulting from missing return values.
[SVN r34259]
2006-06-09 11:40:07 +00:00
Alisdair Meredith 7da1c4b310 Remove size zero support for old compilers that do not support partial template specialization
[SVN r34161]
2006-06-04 11:01:59 +00:00
Alisdair Meredith 8f10fdf27e Support for zero length arrays
[SVN r34154]
2006-06-03 12:51:13 +00:00
2 changed files with 42 additions and 5 deletions
+37 -5
View File
@@ -14,8 +14,8 @@
* http://www.boost.org/LICENSE_1_0.txt)
*
* 10 Mar 2010 - (mtc) fill method added, matching resolution of the standard library working group.
* See <http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#776> or Trac issue #3168
* Eventually, we should remove "assign" which is now a synonym for "fill" (Marshall Clow)
* See <http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#776> or Trac issue #3168
* Eventually, we should remove "assign" which is now a synonym for "fill" (Marshall Clow)
* 10 Mar 2010 - added workaround for SUNCC and !STLPort [trac #3893] (Marshall Clow)
* 29 Jan 2004 - c_array() added, BOOST_NO_PRIVATE_IN_AGGREGATE removed (Nico Josuttis)
* 23 Aug 2002 - fix for Non-MSVC compilers combined with MSVC libraries.
@@ -169,7 +169,7 @@ namespace boost {
}
// assign one value to all elements
void assign (const T& value) { fill ( value ); } // A synonym for fill
void assign (const T& value) { fill ( value ); } // A synonym for fill
void fill (const T& value)
{
std::fill_n(begin(),size(),value);
@@ -295,8 +295,8 @@ namespace boost {
// assign one value to all elements
void assign (const T& value) { fill ( value ); }
void fill (const T& ) {}
void fill (const T& ) {}
// check range (may be private because it is static)
static reference failed_rangecheck () {
std::out_of_range e("attempt to access element of an empty array");
@@ -346,6 +346,38 @@ namespace boost {
x.swap(y);
}
// Specific for boost::array: simply returns its elems data member.
template <typename T, std::size_t N>
T(&get_c_array(boost::array<T,N>& arg))[N]
{
return arg.elems;
}
// Const version.
template <typename T, std::size_t N>
const T(&get_c_array(const boost::array<T,N>& arg))[N]
{
return arg.elems;
}
#if 0
// Overload for std::array, assuming that std::array will have
// explicit conversion functions as discussed at the WG21 meeting
// in Summit, March 2009.
template <typename T, std::size_t N>
T(&get_c_array(std::array<T,N>& arg))[N]
{
return static_cast<T(&)[N]>(arg);
}
// Const version.
template <typename T, std::size_t N>
const T(&get_c_array(const std::array<T,N>& arg))[N]
{
return static_cast<T(&)[N]>(arg);
}
#endif
} /* namespace boost */
+5
View File
@@ -5,6 +5,11 @@
* http://www.boost.org/LICENSE_1_0.txt)
*/
#ifndef _SCL_SECURE_NO_WARNINGS
// Suppress warnings from the std lib:
# define _SCL_SECURE_NO_WARNINGS
#endif
#include <algorithm>
#include <functional>
#include <boost/array.hpp>