---
name: "__gnu_pbds::hash_exponential_size_policy"
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_pbds::hash_exponential_size_policy"
---

# \_\_gnu\_pbds::hash\_exponential\_size\_policy(3)

A size policy whose sequence of sizes form an exponential sequence (typically powers of 2.

## NAME

\_\_gnu\_pbds::hash\_exponential\_size\_policy\< Size\_Type \> - A size policy whose sequence of sizes form an exponential sequence (typically powers of 2.

## SYNOPSIS

\#include \<hash\_policy.hpp\>

Inherited by **\_\_gnu\_pbds::hash\_standard\_resize\_policy\< Size\_Policy, Trigger\_Policy, External\_Size\_Access, Size\_Type \>**.

### Public Types

typedef Size\_Type **size\_type**\

### Public Member Functions

**hash\_exponential\_size\_policy** (size\_type start\_size=8, size\_type grow\_factor=2)\
 Default constructor, or onstructor taking a start\_size, or constructor taking a start size and grow\_factor. The policy will use the sequence of sizes start\_size, start\_size\* grow\_factor, start\_size\* grow\_factor^2, ...  void **swap** (**hash\_exponential\_size\_policy**\< Size\_Type \> &other)\

### Protected Member Functions

size\_type **get\_nearest\_larger\_size** (size\_type size) const\
 size\_type **get\_nearest\_smaller\_size** (size\_type size) const\

## Detailed Description

### template\<typename Size\_Type = std::size\_t\>

class \_\_gnu\_pbds::hash\_exponential\_size\_policy\< Size\_Type \>"A size policy whose sequence of sizes form an exponential sequence (typically powers of 2.

## Constructor & Destructor Documentation

### template\<typename Size\_Type\> \_\_gnu\_pbds::hash\_exponential\_size\_policy\< Size\_Type \>::hash\_exponential\_size\_policy (size\_type start\_size = 8, size\_type grow\_factor = 2)

Default constructor, or onstructor taking a start\_size, or constructor taking a start size and grow\_factor. The policy will use the sequence of sizes start\_size, start\_size\* grow\_factor, start\_size\* grow\_factor^2, ...

## Author

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