| Server IP : 217.160.0.212 / Your IP : 216.73.216.141 Web Server : Apache System : Linux www 6.18.51-i1-ampere #1196 SMP Fri Sep 11 20:43:55 CEST 2026 aarch64 User : sws1073854427 ( 1073854427) PHP Version : 8.4.23 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /lib/python3/dist-packages/pythran/pythonic/builtins/ |
Upload File : |
#ifndef PYTHONIC_BUILTIN_ITER_HPP
#define PYTHONIC_BUILTIN_ITER_HPP
#include "pythonic/include/builtins/iter.hpp"
#include "pythonic/utils/functor.hpp"
PYTHONIC_NS_BEGIN
namespace builtins
{
namespace details
{
/// details iter implementation
template <class T>
iter<T>::iter()
{
}
// FIXME : There is a dangling reference as data.begin() is ! the one
// from data "saved" in the "iter" struct
template <class T>
iter<T>::iter(T data)
: iterator(data.begin()), _end(data.end()), data(data)
{
}
template <class T>
typename iter<T>::iterator &iter<T>::begin()
{
return *this;
}
template <class T>
typename iter<T>::iterator const &iter<T>::begin() const
{
return *this;
}
template <class T>
typename iter<T>::iterator const &iter<T>::end() const
{
return _end;
}
}
/// iter implementation
template <class T>
details::iter<
typename std::remove_cv<typename std::remove_reference<T>::type>::type>
iter(T &&t)
{
return {std::forward<T>(t)};
}
}
PYTHONIC_NS_END
#endif