Proton
1.1.1
Make porting easy from Python to C++11
|
like list in python, better for small sequences More...
Classes | |
class | proton::vector_< T, A > |
a vector extension implementing python's list-like interfaces. More... |
Functions | |
template<typename T , typename A , typename V > | |
std::vector< T, A > & | proton::operator<< (std::vector< T, A > &x, V &&val) |
add an item in streaming style. | |
template<typename T , typename A , typename V > | |
std::vector< T, A > & | proton::operator>> (std::vector< T, A > &x, V &val) |
pop an item in streaming style. | |
template<typename T , typename A > | |
std::ostream & | proton::operator<< (std::ostream &s, const std::vector< T, A > &x) |
general output for vector. | |
template<typename T , typename A , typename X > | |
vector_< T, A > | proton::operator+ (const std::vector< T, A > &s, X &&t) |
vector + vector | |
template<typename T , typename A > | |
vector_< T, A > | proton::operator* (const std::vector< T, A > &s, size_t n) |
vector_ * n | |
template<typename T , typename A > | |
vector_< T, A > | proton::operator* (size_t n, const std::vector< T, A > &s) |
n * vector_ | |
template<typename T , typename A > | |
vector_< T, A > & | proton::cast_ (std::vector< T, A > &x) |
cast to proton::vector_<>& from std::vector<>&. |
like list in python, better for small sequences
std::vector<T,A>& proton::operator<< | ( | std::vector< T, A > & | x, |
V && | val | ||
) |
add an item in streaming style.
x | the vector to be added |
val | the new item |
Definition at line 33 of file vector.hpp.
std::ostream& proton::operator<< | ( | std::ostream & | s, |
const std::vector< T, A > & | x | ||
) |
general output for vector.
s | the output stream |
x | the vector to be outputed |
Definition at line 59 of file vector.hpp.
std::vector<T,A>& proton::operator>> | ( | std::vector< T, A > & | x, |
V & | val | ||
) |
pop an item in streaming style.
x | the vector to be popped from |
val | the popped item |
Definition at line 45 of file vector.hpp.
References PROTON_THROW_IF.