const std::tr1::shared_ptr<T>
 next()
 {
   if (curr_ != end_)
     {
       std::tr1::shared_ptr<T> val = curr_.load();
       ++curr_;
       return val;
     }
   throw stop_iteration();
 }
Exemple #2
0
 void next() {
     if(_end)
         throw stop_iteration();
     if(swapcontext(&_context_parent, &_context_child) == -1)
         throw std::runtime_error("next: fail @ swapcontext");
 }