forked from boostorg/array
Mark assign
as deprecated
This commit is contained in:
@ -163,13 +163,16 @@ namespace boost {
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
// assign one value to all elements
|
// fill with one value
|
||||||
void assign (const T& value) { fill ( value ); } // A synonym for fill
|
|
||||||
BOOST_CXX14_CONSTEXPR void fill (const T& value)
|
BOOST_CXX14_CONSTEXPR void fill (const T& value)
|
||||||
{
|
{
|
||||||
std::fill_n(begin(),size(),value);
|
std::fill_n(begin(),size(),value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// an obsolete synonym for fill
|
||||||
|
BOOST_DEPRECATED( "please use `fill` instead" )
|
||||||
|
void assign (const T& value) { fill ( value ); }
|
||||||
|
|
||||||
// check range (may be private because it is static)
|
// check range (may be private because it is static)
|
||||||
static BOOST_CONSTEXPR bool rangecheck (size_type i) {
|
static BOOST_CONSTEXPR bool rangecheck (size_type i) {
|
||||||
return i >= size() ? boost::throw_exception(std::out_of_range ("array<>: index out of range")), true : true;
|
return i >= size() ? boost::throw_exception(std::out_of_range ("array<>: index out of range")), true : true;
|
||||||
@ -278,8 +281,11 @@ namespace boost {
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
// assign one value to all elements
|
// an obsolete synonym for fill
|
||||||
|
BOOST_DEPRECATED( "please use `fill` instead" )
|
||||||
void assign (const T& value) { fill ( value ); }
|
void assign (const T& value) { fill ( value ); }
|
||||||
|
|
||||||
|
// fill with one value
|
||||||
BOOST_CXX14_CONSTEXPR void fill (const T& ) {}
|
BOOST_CXX14_CONSTEXPR void fill (const T& ) {}
|
||||||
|
|
||||||
// check range (may be private because it is static)
|
// check range (may be private because it is static)
|
||||||
|
Reference in New Issue
Block a user