---
name: "__gnu_cxx::random_condition"
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::random_condition/3cxx"
---

# \_\_gnu\_cxx::random\_condition(3cxx)

Base class for random probability control and throw.

## NAME

\_\_gnu\_cxx::random\_condition - Base class for random probability control and throw.

## SYNOPSIS

`#include <throw_allocator.h>`

Inherits **\_\_gnu\_cxx::condition\_base**.

Inherited by **\_\_gnu\_cxx::throw\_allocator\_base\< \_Tp, random\_condition \>**, and **\_\_gnu\_cxx::throw\_value\_base\< random\_condition \>**.

### Classes

struct **always\_adjustor**\
 Always enter the condition.  struct **group\_adjustor**\
 Group condition.  struct **never\_adjustor**\
 Never enter the condition.

### Public Member Functions

void **seed** (unsigned long \_\_s)\

### Static Public Member Functions

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

## Detailed Description

Base class for random probability control and throw.

## Author

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