GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||
GeezerVison is showing cplusplus.com — std::valarray::resize Reference
valarray
public member function
<valarray>
std::valarray::resizevoid resize (size_t sz, T c = T()); Resize valarray
After resizing, the previous contents are lost: the valarray will contain sz elements, all of them with a value of c. All pointers and references to elements of the valarray are invalidated by the call. ParametersReturn valuenoneExample
Output:
ComplexityDepends on library implementation (operations may be parallelized).Iterator validityInvalidates all iterators, references and sub-arrays of the valarray.Data racesThe valarray and all its elements are modified.Exception safetyIf any operation performed on the elements throws an exception, it causes undefined behavior.If the function needs to allocate storage and fails, it may throw an exception (such as bad_alloc), although this is not mandated. See also
Home page | Privacy policy
© cplusplus.com, 2000-2026 - All rights reserved - v3.3.4s Spotted an error? contact us | |||
| You are visitor 01402520 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |