---
name: "__gnu_pbds::lu_move_to_front_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::lu_move_to_front_policy"
---

# \_\_gnu\_pbds::lu\_move\_to\_front\_policy(3)

## NAME

\_\_gnu\_pbds::lu\_move\_to\_front\_policy\< \_Alloc \>

## SYNOPSIS

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

### Public Types

typedef \_Alloc **allocator\_type**\
 typedef **detail::rebind\_traits**\< \_Alloc, **metadata\_type** \>::reference **metadata\_reference**\
 Reference to metadata on which this functor operates.  typedef **null\_type** **metadata\_type**\
 Metadata on which this functor operates.

### Public Member Functions

**metadata\_type** **operator()** () const\
 Creates a metadata object.  bool **operator()** (**metadata\_reference** r\_metadata) const\
 Decides whether a metadata object should be moved to the front of the list.

## Detailed Description

### template\<typename \_Alloc = std::allocator\<char\>\>

class \_\_gnu\_pbds::lu\_move\_to\_front\_policy\< \_Alloc \>"A list-update policy that unconditionally moves elements to the front of the list. A null type means that each link in a list-based container does not actually need metadata.

## Member Typedef Documentation

### template\<typename \_Alloc = std::allocator\<char\>\> typedef detail::rebind\_traits\<\_Alloc,metadata\_type\>::reference \_\_gnu\_pbds::lu\_move\_to\_front\_policy\< \_Alloc \>::metadata\_reference

Reference to metadata on which this functor operates.

### template\<typename \_Alloc = std::allocator\<char\>\> typedef null\_type \_\_gnu\_pbds::lu\_move\_to\_front\_policy\< \_Alloc \>::metadata\_type

Metadata on which this functor operates.

## Member Function Documentation

### template\<typename \_Alloc = std::allocator\<char\>\> metadata\_type \_\_gnu\_pbds::lu\_move\_to\_front\_policy\< \_Alloc \>::operator() () const \[inline\]

Creates a metadata object.

### template\<typename \_Alloc = std::allocator\<char\>\> bool \_\_gnu\_pbds::lu\_move\_to\_front\_policy\< \_Alloc \>::operator() (metadata\_reference r\_metadata) const \[inline\]

Decides whether a metadata object should be moved to the front of the list.

## Author

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