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

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

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

Go to the source code of this file.

Classes

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

Functions

template<typename T >
void pmem::obj::experimental::swap (vector< T > &lhs, vector< T > &rhs)
 Swaps the contents of lhs and rhs. More...
 
template<typename T >
bool pmem::obj::experimental::operator== (const vector< T > &lhs, const vector< T > &rhs)
 Comparison operator. More...
 
template<typename T >
bool pmem::obj::experimental::operator!= (const vector< T > &lhs, const vector< T > &rhs)
 Comparison operator. More...
 
template<typename T >
bool pmem::obj::experimental::operator< (const vector< T > &lhs, const vector< T > &rhs)
 Comparison operator. More...
 
template<typename T >
bool pmem::obj::experimental::operator<= (const vector< T > &lhs, const vector< T > &rhs)
 Comparison operator. More...
 
template<typename T >
bool pmem::obj::experimental::operator> (const vector< T > &lhs, const vector< T > &rhs)
 Comparison operator. More...
 
template<typename T >
bool pmem::obj::experimental::operator>= (const vector< T > &lhs, const vector< T > &rhs)
 Comparison operator. More...
 
template<typename T >
bool pmem::obj::experimental::operator== (const vector< T > &lhs, const std::vector< T > &rhs)
 Comparison operator. More...
 
template<typename T >
bool pmem::obj::experimental::operator!= (const vector< T > &lhs, const std::vector< T > &rhs)
 Comparison operator. More...
 
template<typename T >
bool pmem::obj::experimental::operator< (const vector< T > &lhs, const std::vector< T > &rhs)
 Comparison operator. More...
 
template<typename T >
bool pmem::obj::experimental::operator<= (const vector< T > &lhs, const std::vector< T > &rhs)
 Comparison operator. More...
 
template<typename T >
bool pmem::obj::experimental::operator> (const vector< T > &lhs, const std::vector< T > &rhs)
 Comparison operator. More...
 
template<typename T >
bool pmem::obj::experimental::operator>= (const vector< T > &lhs, const std::vector< T > &rhs)
 Comparison operator. More...
 
template<typename T >
bool pmem::obj::experimental::operator== (const std::vector< T > &lhs, const vector< T > &rhs)
 Comparison operator. More...
 
template<typename T >
bool pmem::obj::experimental::operator!= (const std::vector< T > &lhs, const vector< T > &rhs)
 Comparison operator. More...
 
template<typename T >
bool pmem::obj::experimental::operator< (const std::vector< T > &lhs, const vector< T > &rhs)
 Comparison operator. More...
 
template<typename T >
bool pmem::obj::experimental::operator<= (const std::vector< T > &lhs, const vector< T > &rhs)
 Comparison operator. More...
 
template<typename T >
bool pmem::obj::experimental::operator> (const std::vector< T > &lhs, const vector< T > &rhs)
 Comparison operator. More...
 
template<typename T >
bool pmem::obj::experimental::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::experimental::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::experimental::vector<T>
Returns
true if contents of the containers are not equal, false otherwise

◆ operator!=() [2/3]

template<typename T >
bool pmem::obj::experimental::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::experimental::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::experimental::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::experimental::vector<T>
[in]rhssecond vector of type pmem::obj::experimental::vector<T>
Returns
true if contents of the containers are not equal, false otherwise

◆ operator<() [1/3]

template<typename T >
bool pmem::obj::experimental::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::experimental::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::experimental::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::experimental::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::experimental::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::experimental::vector<T>
[in]rhssecond vector of type pmem::obj::experimental::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::experimental::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::experimental::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::experimental::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::experimental::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::experimental::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::experimental::vector<T>
[in]rhssecond vector of type pmem::obj::experimental::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::experimental::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::experimental::vector<T>
Returns
true if contents of the containers are equal, false otherwise

◆ operator==() [2/3]

template<typename T >
bool pmem::obj::experimental::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::experimental::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::experimental::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::experimental::vector<T>
[in]rhssecond vector of type pmem::obj::experimental::vector<T>
Returns
true if contents of the containers are equal, false otherwise

◆ operator>() [1/3]

template<typename T >
bool pmem::obj::experimental::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::experimental::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::experimental::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::experimental::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::experimental::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::experimental::vector<T>
[in]rhssecond vector of type pmem::obj::experimental::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::experimental::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::experimental::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::experimental::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::experimental::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::experimental::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::experimental::vector<T>
[in]rhssecond vector of type pmem::obj::experimental::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::experimental::swap ( vector< T > &  lhs,
vector< T > &  rhs 
)

Swaps the contents of lhs and rhs.

Parameters
[in]lhsfirst vector
[in]rhssecond vector