STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Private Types | Static Private Attributes | List of all members
__gnu_pbds::lu_move_to_front_policy< _Alloc > Class Template Reference

#include <ext/pb_ds/list_update_policy.hpp>

Public Types

typedef _Alloc allocator_type
 
typedef null_type metadata_type
 Metadata on which this functor operates. More...
 
typedef
__rebind_m::other::reference 
metadata_reference
 Reference to metadata on which this functor operates. More...
 

Public Member Functions

metadata_type operator() () const
 Creates a metadata object. More...
 
bool operator() (metadata_reference r_metadata) const
 

Private Types

typedef _Alloc::template
rebind< metadata_type
__rebind_m
 

Static Private Attributes

static null_type s_metadata
 

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 _Alloc::template rebind<metadata_type> __gnu_pbds::lu_move_to_front_policy< _Alloc >::__rebind_m
private
template<typename _Alloc = std::allocator<char>>
typedef _Alloc __gnu_pbds::lu_move_to_front_policy< _Alloc >::allocator_type
template<typename _Alloc = std::allocator<char>>
typedef __rebind_m::other::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.

75  { return s_metadata; }
static null_type s_metadata
Definition: list_update_policy.hpp:84
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.

81  { return true; }

Member Data Documentation

template<typename _Alloc = std::allocator<char>>
null_type __gnu_pbds::lu_move_to_front_policy< _Alloc >::s_metadata
staticprivate

The documentation for this class was generated from the following file: