range.hpp File Reference

Go to the source code of this file.

Namespaces

 atria
 C++ amazing templates and reusable implementations awesomeness.
 
 atria::xform
 Efficient and flexible C++ implementation of transducers.
 

Functions

template<typename StopT >
constexpr auto range (StopT &&stop) -> decltype(comp( count(), take(std::forward< StopT >(stop))))
 Generator transducer version of Python range More...
 
template<typename StartT , typename StopT >
constexpr auto range (StartT &&start, StopT &&stop) -> decltype(comp( count(start), take(std::max(decltype(stop-start)
 
template<typename StartT , typename StopT , typename StepT >
constexpr auto range (StartT &&start, StopT &&stop, StepT &&step) -> decltype(comp( count(start, step), take(std::max(decltype((stop-start)/step)
 

Variables

stop start { return ( comp( count(start), take(std::max(decltype(stop - start){}, stop - start))) )
 
stop start step { return ( comp( count(start, step), take(std::max(decltype((stop - start) / step){}, (stop - start) / step))) )
 
Fork me on GitHub