#include <list>
#include <string>
#include <iostream>
struct Point {
    std::string name;
};
int main()
{
    std::list<Point> _pointList{{"foo"}, {"bar"}, {"baz"}};
    if(_pointList.size() > 1)
    {
        std::list<Point>::iterator itr;
        std::list<Point>::iterator itr2;

        for(itr = _pointList.begin(); itr != _pointList.end(); itr++)
        {
            //set the second iterator to the next Point in the list.
            itr2 = itr;
            itr2++;
            if(itr2 == _pointList.end())
               itr2 = _pointList.begin();

            std::cout << "The first point's name is: " << itr->name << '\n'
                      << "The second point's name is: " << itr2->name << '\n';
        }
    }
}
