GNU g++  v5.2.1
GNU Standard C++
__gnu_pbds::lu_move_to_front_policy< _Alloc > Class Template Reference

A list-update policy that unconditionally moves elements to the front of the list. More...

#include <list_update_policy.hpp>

Collaboration diagram for __gnu_pbds::lu_move_to_front_policy< _Alloc >:

Public Types

typedef _Alloc allocator_type
 
typedef __rebind_m::other::reference metadata_reference
 Reference to metadata on which this functor operates. More...
 
typedef null_type metadata_type
 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
 Decides whether a metadata object should be moved to the front of the list. More...
 

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.

References __gnu_pbds::lu_move_to_front_policy< _Alloc >::s_metadata.

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.

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: