---
name: "__gnu_cxx::throw_value_random"
section: "3cxx"
platform: "linux"
package: "libstdc++-12-doc"
version: "12.4.0-5"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/__gnu_cxx::throw_value_random/3cxx"
---

# \_\_gnu\_cxx::throw\_value\_random(3cxx)

Type throwing via random condition.

## NAME

\_\_gnu\_cxx::throw\_value\_random - Type throwing via random condition.

## SYNOPSIS

`#include <throw_allocator.h>`

Inherits **\_\_gnu\_cxx::throw\_value\_base\< random\_condition \>**.

### Public Types

typedef **throw\_value\_base**\< **random\_condition** \> **base\_type**\
 typedef **random\_condition** **condition\_type**\

### Public Member Functions

**throw\_value\_random** (const std::size\_t \_\_i)\
 **throw\_value\_random** (const **throw\_value\_random** &\_\_other)\
 **throw\_value\_random** (**throw\_value\_random** &&)=default\
 **throw\_value\_base** & **operator++** ()\
 **throw\_value\_random** & **operator=** (const **throw\_value\_random** &\_\_other)\
 **throw\_value\_random** & **operator=** (**throw\_value\_random** &&)=default\
 void **seed** (unsigned long \_\_s)\

### Static Public Member Functions

static void **set\_probability** (double \_\_p)\
 static void **throw\_conditionally** ()\

### Public Attributes

std::size\_t **\_M\_i**\

## Detailed Description

Type throwing via random condition.

## Author

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