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

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

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