---
name: "__gnu_parallel::replace_selector"
section: "3"
platform: "linux"
package: "libstdc++6-4.3-doc"
version: "4.3.2-1.1"
release: "Debian 5.0 (Lenny)"
platforms: ["linux"]
url: "https://new.carta.tech/__gnu_parallel::replace_selector"
---

# \_\_gnu\_parallel::replace\_selector(3)

## NAME

\_\_gnu\_parallel::replace\_selector -

## SYNOPSIS

Inherits **\_\_gnu\_parallel::generic\_for\_each\_selector\< It \>**.

## Detailed Description

### template\<typename It, typename T\> struct \_\_gnu\_parallel::replace\_selector\< It, T \>

std::replace() selector.

Definition at line 140 of file for\_each\_selectors.h.

### Public Member Functions

bool **operator()** (T &v, It i)\
 **replace\_selector** (const T &**new\_val**)\

### Public Attributes

It **finish\_iterator**\
 const T & **new\_val**\

## Constructor & Destructor Documentation

### template\<typename It, typename T\> \_\_gnu\_parallel::replace\_selector\< It, T \>::replace\_selector (const T & new\_val)` [inline, explicit]`

Constructor.

**Parameters:**

*new\_val* Value to replace with.

Definition at line 148 of file for\_each\_selectors.h.

## Member Function Documentation

### template\<typename It, typename T\> bool \_\_gnu\_parallel::replace\_selector\< It, T \>::operator() (T & v, It i)` [inline]`

Functor execution.

**Parameters:**

*v* Current value. \
 *i* Iterator referencing object.

Definition at line 154 of file for\_each\_selectors.h.

References \_\_gnu\_parallel::replace\_selector\< It, T \>::new\_val.

## Member Data Documentation

### template\<typename It\> It \_\_gnu\_parallel::generic\_for\_each\_selector\< It \>::finish\_iterator` [inherited]`

Iterator on last element processed; needed for some algorithms (e. g. std::transform()).

Definition at line 54 of file for\_each\_selectors.h.

### template\<typename It, typename T\> const T& \_\_gnu\_parallel::replace\_selector\< It, T \>::new\_val

Value to replace with.

Definition at line 143 of file for\_each\_selectors.h.

Referenced by \_\_gnu\_parallel::replace\_selector\< It, T \>::operator()().

## Author

Generated automatically by Doxygen for libstdc++ from the source code.
