Subject: [Boost-bugs] [Boost C++ Libraries] #3168: Request for boost::array::fill(const T&), following C++0x
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2009-06-11 20:31:06
#3168: Request for boost::array::fill(const T&), following C++0x
------------------------------+---------------------------------------------
Reporter: niels_dekker | Owner: no-maintainer
Type: Feature Requests | Status: new
Milestone: Boost 1.40.0 | Component: array
Version: Boost 1.39.0 | Severity: Problem
Keywords: |
------------------------------+---------------------------------------------
According to the latest C++0x Working Draft, [http://www.open-
std.org/jtc1/sc22/wg21/docs/papers/2009/n2857.pdf N2857], std::array will
have a member function named ''fill''.
Quoting 23.3.1.5 array::fill [array.fill]:
{{{
requires CopyAssignable<T> void fill(const T& u);
1 Effects: fill_n(begin(), N, u)
}}}
Even while using a compiler that does not support C++0x concepts, I think
it's desirable to have this function added to boost::array already. E.g.,
as follows:
{{{
void fill(const T& value)
{
std::fill_n(elems, N, value);
}
}}}
Of course, it is effectively the same as boost::array::assign. Maybe
boost::array::assign should become deprecated.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/3168> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:00 UTC