File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -163,13 +163,16 @@ namespace boost {
163
163
return *this ;
164
164
}
165
165
166
- // assign one value to all elements
167
- void assign (const T& value) { fill ( value ); } // A synonym for fill
166
+ // fill with one value
168
167
BOOST_CXX14_CONSTEXPR void fill (const T& value)
169
168
{
170
169
std::fill_n (begin (),size (),value);
171
170
}
172
171
172
+ // an obsolete synonym for fill
173
+ BOOST_DEPRECATED ( " please use `fill` instead" )
174
+ void assign (const T& value) { fill ( value ); }
175
+
173
176
// check range (may be private because it is static)
174
177
static BOOST_CONSTEXPR bool rangecheck (size_type i) {
175
178
return i >= size () ? boost::throw_exception (std::out_of_range (" array<>: index out of range" )), true : true ;
@@ -278,8 +281,11 @@ namespace boost {
278
281
return *this ;
279
282
}
280
283
281
- // assign one value to all elements
284
+ // an obsolete synonym for fill
285
+ BOOST_DEPRECATED ( " please use `fill` instead" )
282
286
void assign (const T& value) { fill ( value ); }
287
+
288
+ // fill with one value
283
289
BOOST_CXX14_CONSTEXPR void fill (const T& ) {}
284
290
285
291
// check range (may be private because it is static)
You can’t perform that action at this time.
0 commit comments