---
name: "__gnu_pbds::sample_update_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::sample_update_policy"
---

# \_\_gnu\_pbds::sample\_update\_policy(3)

A sample list-update policy.

## NAME

\_\_gnu\_pbds::sample\_update\_policy - A sample list-update policy.

## SYNOPSIS

\#include \<sample\_update\_policy.hpp\>

### Public Member Functions

**sample\_update\_policy** ()\
 Default constructor.  **sample\_update\_policy** (const sample\_update\_policy &)\
 Copy constructor.  void **swap** (**sample\_update\_policy** &other)\
 Swaps content.

### Protected Types

typedef some\_metadata\_type **metadata\_type**\
 Metadata on which this functor operates.

### Protected Member Functions

**metadata\_type** **operator()** () const\
 Creates a metadata object.  bool **operator()** (metadata\_reference) const\
 Decides whether a metadata object should be moved to the front of the list. A list-update based containers object will call this method to decide whether to move a node to the front of the list. The method shoule return true if the node should be moved to the front of the list.

## Detailed Description

A sample list-update policy.

## Member Typedef Documentation

### typedef some\_metadata\_type \_\_gnu\_pbds::sample\_update\_policy::metadata\_type \[protected\]

Metadata on which this functor operates.

## Constructor & Destructor Documentation

### \_\_gnu\_pbds::sample\_update\_policy::sample\_update\_policy ()

Default constructor.

Referenced by **sample\_update\_policy()**, and **swap()**.

### \_\_gnu\_pbds::sample\_update\_policy::sample\_update\_policy (const sample\_update\_policy & )

Copy constructor.

References **sample\_update\_policy()**.

## Member Function Documentation

### metadata\_type \_\_gnu\_pbds::sample\_update\_policy::operator() () const \[protected\]

Creates a metadata object.

### bool \_\_gnu\_pbds::sample\_update\_policy::operator() (metadata\_reference ) const \[protected\]

Decides whether a metadata object should be moved to the front of the list. A list-update based containers object will call this method to decide whether to move a node to the front of the list. The method shoule return true if the node should be moved to the front of the list.

### void \_\_gnu\_pbds::sample\_update\_policy::swap (sample\_update\_policy & other) \[inline\]

Swaps content.

References **sample\_update\_policy()**.

## Author

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