Proton  1.1.1
Make porting easy from Python to C++11
tuple

like tuple in python. More...

Functions

template<long index, typename... T>
detail::at_index
< detail::get_index(index,
sizeof...(T)), T...>::type 
proton::at (const std::tuple< T...> &x)
 like x[index] in python
template<long begin, long end = std::numeric_limits<long>::max(), typename... T>
detail::sub< std::tuple< T...>
, detail::fix_index(begin,
sizeof...(T)),
detail::fix_size(begin, end,
sizeof...(T))>::type 
proton::sub (const std::tuple< T...> &x)
 get a slice of tuple x[begin:end] in python
template<typename... T>
std::ostream & proton::operator<< (std::ostream &s, const std::tuple< T...> &x)
 general output for tuple.
template<typename T2 , typename... T1>
auto proton::operator+ (const std::tuple< T1...> &x, T2 &&y)-> decltype(std
 tuple + tuple
template<typename... T>
auto proton::_t (T &&...x)-> decltype(std
 eq to make_tuple
template<typename... T>
auto proton::_f (T &&...x)-> decltype(std
 eq to forward_as_tuple

Detailed Description

like tuple in python.


Function Documentation

template<typename... T>
std::ostream& proton::operator<< ( std::ostream &  s,
const std::tuple< T...> &  x 
)

general output for tuple.

Parameters:
sthe output stream
xthe tuple to be outputed
Returns:
s

Definition at line 184 of file tuple.hpp.