PMDK C++ bindings  1.8.2
This is the C++ bindings documentation for PMDK's libpmemobj.
Classes | Namespaces | Functions
vector.hpp File Reference

Vector container with std::vector compatible interface. More...

#include <libpmemobj++/container/detail/contiguous_iterator.hpp>
#include <libpmemobj++/detail/common.hpp>
#include <libpmemobj++/detail/iterator_traits.hpp>
#include <libpmemobj++/detail/life.hpp>
#include <libpmemobj++/detail/temp_value.hpp>
#include <libpmemobj++/make_persistent.hpp>
#include <libpmemobj++/persistent_ptr.hpp>
#include <libpmemobj++/pext.hpp>
#include <libpmemobj++/slice.hpp>
#include <libpmemobj++/transaction.hpp>
#include <libpmemobj/base.h>
#include <algorithm>
#include <cassert>
#include <utility>
#include <vector>

Go to the source code of this file.

Classes

class  pmem::obj::vector< T >
 pmem::obj::vector - persistent container with std::vector compatible interface. More...
 

Namespaces

 pmem
 A persistent version of concurrent hash map implementation Ref: https://arxiv.org/abs/1509.02235.
 

Functions

template<typename T >
void pmem::obj::swap (vector< T > &lhs, vector< T > &rhs)
 Swaps the contents of lhs and rhs. More...
 
template<typename T >
bool pmem::obj::operator== (const vector< T > &lhs, const vector< T > &rhs)
 Comparison operator. More...
 
template<typename T >
bool pmem::obj::operator!= (const vector< T > &lhs, const vector< T > &rhs)
 Comparison operator. More...
 
template<typename T >
bool pmem::obj::operator< (const vector< T > &lhs, const vector< T > &rhs)
 Comparison operator. More...
 
template<typename T >
bool pmem::obj::operator<= (const vector< T > &lhs, const vector< T > &rhs)
 Comparison operator. More...
 
template<typename T >
bool pmem::obj::operator> (const vector< T > &lhs, const vector< T > &rhs)
 Comparison operator. More...
 
template<typename T >
bool pmem::obj::operator>= (const vector< T > &lhs, const vector< T > &rhs)
 Comparison operator. More...
 
template<typename T >
bool pmem::obj::operator== (const vector< T > &lhs, const std::vector< T > &rhs)
 Comparison operator. More...
 
template<typename T >
bool pmem::obj::operator!= (const vector< T > &lhs, const std::vector< T > &rhs)
 Comparison operator. More...
 
template<typename T >
bool pmem::obj::operator< (const vector< T > &lhs, const std::vector< T > &rhs)
 Comparison operator. More...
 
template<typename T >
bool pmem::obj::operator<= (const vector< T > &lhs, const std::vector< T > &rhs)
 Comparison operator. More...
 
template<typename T >
bool pmem::obj::operator> (const vector< T > &lhs, const std::vector< T > &rhs)
 Comparison operator. More...
 
template<typename T >
bool pmem::obj::operator>= (const vector< T > &lhs, const std::vector< T > &rhs)
 Comparison operator. More...
 
template<typename T >
bool pmem::obj::operator== (const std::vector< T > &lhs, const vector< T > &rhs)
 Comparison operator. More...
 
template<typename T >
bool pmem::obj::operator!= (const std::vector< T > &lhs, const vector< T > &rhs)
 Comparison operator. More...
 
template<typename T >
bool pmem::obj::operator< (const std::vector< T > &lhs, const vector< T > &rhs)
 Comparison operator. More...
 
template<typename T >
bool pmem::obj::operator<= (const std::vector< T > &lhs, const vector< T > &rhs)
 Comparison operator. More...
 
template<typename T >
bool pmem::obj::operator> (const std::vector< T > &lhs, const vector< T > &rhs)
 Comparison operator. More...
 
template<typename T >
bool pmem::obj::operator>= (const std::vector< T > &lhs, const vector< T > &rhs)
 Comparison operator. More...
 

Detailed Description

Vector container with std::vector compatible interface.

Function Documentation

◆ operator!=() [1/3]

template<typename T >
bool pmem::obj::operator!= ( const vector< T > &  lhs,
const vector< T > &  rhs 
)

Comparison operator.

Compares the contents of two containers.

Checks if containers have the same number of elements and each element in lhs is equal to element in rhs at the same position.

Parameters
[in]lhsfirst vector of type pmem::obj::vector<T>
[in]rhssecond vector of type pmem::obj::vector<T>
Returns
true if contents of the containers are not equal, false otherwise

◆ operator!=() [2/3]

template<typename T >
bool pmem::obj::operator!= ( const vector< T > &  lhs,
const std::vector< T > &  rhs 
)

Comparison operator.

Compares the contents of two containers.

Checks if containers have the same number of elements and each element in lhs is equal to element in rhs at the same position.

Parameters
[in]lhsfirst vector of type pmem::obj::vector<T>
[in]rhssecond vector of type std::vector<T>
Returns
true if contents of the containers are not equal, false otherwise

◆ operator!=() [3/3]

template<typename T >
bool pmem::obj::operator!= ( const std::vector< T > &  lhs,
const vector< T > &  rhs 
)

Comparison operator.

Compares the contents of two containers.

Checks if containers have the same number of elements and each element in lhs is equal to element in rhs at the same position.

Parameters
[in]lhsfirst vector of type std::vector<T>
[in]rhssecond vector of type pmem::obj::vector<T>
Returns
true if contents of the containers are not equal, false otherwise

◆ operator<() [1/3]

template<typename T >
bool pmem::obj::operator< ( const vector< T > &  lhs,
const vector< T > &  rhs 
)

Comparison operator.

Compares the contents of two containers lexicographically.

Parameters
[in]lhsfirst vector of type pmem::obj::vector<T>
[in]rhssecond vector of type pmem::obj::vector<T>
Returns
true if contents of lhs are lexicographically less than contents of rhs, false otherwise

◆ operator<() [2/3]

template<typename T >
bool pmem::obj::operator< ( const vector< T > &  lhs,
const std::vector< T > &  rhs 
)

Comparison operator.

Compares the contents of two containers lexicographically.

Parameters
[in]lhsfirst vector of type pmem::obj::vector<T>
[in]rhssecond vector of type std::vector<T>
Returns
true if contents of lhs are lexicographically less than contents of rhs, false otherwise

◆ operator<() [3/3]

template<typename T >
bool pmem::obj::operator< ( const std::vector< T > &  lhs,
const vector< T > &  rhs 
)

Comparison operator.

Compares the contents of two containers lexicographically.

Parameters
[in]lhsfirst vector of type std::vector<T>
[in]rhssecond vector of type pmem::obj::vector<T>
Returns
true if contents of lhs are lexicographically less than contents of rhs, false otherwise

◆ operator<=() [1/3]

template<typename T >
bool pmem::obj::operator<= ( const vector< T > &  lhs,
const vector< T > &  rhs 
)

Comparison operator.

Compares the contents of two containers lexicographically.

Parameters
[in]lhsfirst vector of type pmem::obj::vector<T>
[in]rhssecond vector of type pmem::obj::vector<T>
Returns
true if contents of lhs are lexicographically lesser than or equal to contents of rhs, false otherwise

◆ operator<=() [2/3]

template<typename T >
bool pmem::obj::operator<= ( const vector< T > &  lhs,
const std::vector< T > &  rhs 
)

Comparison operator.

Compares the contents of two containers lexicographically.

Parameters
[in]lhsfirst vector of type pmem::obj::vector<T>
[in]rhssecond vector of ype std::vector<T>
Returns
true if contents of lhs are lexicographically lesser than or equal to contents of rhs, false otherwise

◆ operator<=() [3/3]

template<typename T >
bool pmem::obj::operator<= ( const std::vector< T > &  lhs,
const vector< T > &  rhs 
)

Comparison operator.

Compares the contents of two containers lexicographically.

Parameters
[in]lhsfirst vector of ype std::vector<T>
[in]rhssecond vector of type pmem::obj::vector<T>
Returns
true if contents of lhs are lexicographically lesser than or equal to contents of rhs, false otherwise

◆ operator==() [1/3]

template<typename T >
bool pmem::obj::operator== ( const vector< T > &  lhs,
const vector< T > &  rhs 
)

Comparison operator.

Compares the contents of two containers.

Checks if containers have the same number of elements and each element in lhs is equal to element in rhs at the same position.

Parameters
[in]lhsfirst vector of type pmem::obj::vector<T>
[in]rhssecond vector of type pmem::obj::vector<T>
Returns
true if contents of the containers are equal, false otherwise

◆ operator==() [2/3]

template<typename T >
bool pmem::obj::operator== ( const vector< T > &  lhs,
const std::vector< T > &  rhs 
)

Comparison operator.

Compares the contents of two containers.

Checks if containers have the same number of elements and each element in lhs is equal to element in rhs at the same position.

Parameters
[in]lhsfirst vector of type pmem::obj::vector<T>
[in]rhssecond vector of type std::vector<T>
Returns
true if contents of the containers are equal, false otherwise

◆ operator==() [3/3]

template<typename T >
bool pmem::obj::operator== ( const std::vector< T > &  lhs,
const vector< T > &  rhs 
)

Comparison operator.

Compares the contents of two containers.

Checks if containers have the same number of elements and each element in lhs is equal to element in rhs at the same position.

Parameters
[in]lhsfirst vector of type std::vector<T>
[in]rhssecond vector of type pmem::obj::vector<T>
Returns
true if contents of the containers are equal, false otherwise

◆ operator>() [1/3]

template<typename T >
bool pmem::obj::operator> ( const vector< T > &  lhs,
const vector< T > &  rhs 
)

Comparison operator.

Compares the contents of two containers lexicographically.

Parameters
[in]lhsfirst vector of type pmem::obj::vector<T>
[in]rhssecond vector of type pmem::obj::vector<T>
Returns
true if contents of lhs are lexicographically greater than contents of rhs, false otherwise

◆ operator>() [2/3]

template<typename T >
bool pmem::obj::operator> ( const vector< T > &  lhs,
const std::vector< T > &  rhs 
)

Comparison operator.

Compares the contents of two containers lexicographically.

Parameters
[in]lhsfirst vector of type pmem::obj::vector<T>
[in]rhssecond vector of type std::vector<T>
Returns
true if contents of lhs are lexicographically greater than contents of rhs, false otherwise

◆ operator>() [3/3]

template<typename T >
bool pmem::obj::operator> ( const std::vector< T > &  lhs,
const vector< T > &  rhs 
)

Comparison operator.

Compares the contents of two containers lexicographically.

Parameters
[in]lhsfirst vector of type std::vector<T>
[in]rhssecond vector of type pmem::obj::vector<T>
Returns
true if contents of lhs are lexicographically greater than contents of rhs, false otherwise

◆ operator>=() [1/3]

template<typename T >
bool pmem::obj::operator>= ( const vector< T > &  lhs,
const vector< T > &  rhs 
)

Comparison operator.

Compares the contents of two containers lexicographically.

Parameters
[in]lhsfirst vector of type pmem::obj::vector<T>
[in]rhssecond vector of type pmem::obj::vector<T>
Returns
true if contents of lhs are lexicographically greater than or equal to contents of rhs, false otherwise

◆ operator>=() [2/3]

template<typename T >
bool pmem::obj::operator>= ( const vector< T > &  lhs,
const std::vector< T > &  rhs 
)

Comparison operator.

Compares the contents of two containers lexicographically.

Parameters
[in]lhsfirst vector of type pmem::obj::vector<T>
[in]rhssecond vector of type std::vector<T>
Returns
true if contents of lhs are lexicographically greater than or equal to contents of rhs, false otherwise

◆ operator>=() [3/3]

template<typename T >
bool pmem::obj::operator>= ( const std::vector< T > &  lhs,
const vector< T > &  rhs 
)

Comparison operator.

Compares the contents of two containers lexicographically.

Parameters
[in]lhsfirst vector of type std::vector<T>
[in]rhssecond vector of type pmem::obj::vector<T>
Returns
true if contents of lhs are lexicographically greater than or equal to contents of rhs, false otherwise

◆ swap()

template<typename T >
void pmem::obj::swap ( vector< T > &  lhs,
vector< T > &  rhs 
)

Swaps the contents of lhs and rhs.

Parameters
[in]lhsfirst vector
[in]rhssecond vector