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::apply Reference
valarray
public member function
<valarray>
std::valarray::applyvalarray apply (T func(T)) const;valarray apply (T func(const T&)) const; Apply function
*this.The valarray returned has the same length as *this.Parameters
Return valueA valarray object with the results of applying func to all the elements of*this.Example
Output:
ComplexityDepends on library implementation (operations may be parallelized).Iterator validityNo changes: Valid iterators, references and sub-arrays keep their validity.Data racesBoth the valarray and its elements are accessed.Exception safetyIf any operation performed on the elements throws an exception, it causes undefined behavior.If the function fails to allocate storage 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 01402503 — 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. |