---
name: "__gnu_cxx::random_condition"
section: "3"
platform: "linux"
package: "gcc"
version: "16.2.1+r23+gd564253eb6c8-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/__gnu_cxx::random_condition"
---

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

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.
