---
name: "__gnu_pbds::sample_update_policy"
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_pbds::sample_update_policy/3cxx"
---

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

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.

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

Copy constructor.

## 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.

## Author

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