Added namespace std prefix in places.

This commit is contained in:
Geert-Jan Giezeman 1999-04-28 20:19:32 +00:00
parent b85e77f463
commit 65fc4aecc8
4 changed files with 22 additions and 22 deletions

View File

@ -59,7 +59,7 @@ MyVector operator-(const MyPoint& p, const MyPoint& q)
// MySegment // MySegment
//-----------------------------------------------------------------------// //-----------------------------------------------------------------------//
typedef pair<MyPoint,MyPoint> MySegment; typedef std::pair<MyPoint,MyPoint> MySegment;
ostream& operator<<(ostream& to, const MySegment& e) ostream& operator<<(ostream& to, const MySegment& e)
{ {

View File

@ -158,7 +158,7 @@ class Polygon_2 {
#else #else
template <class InputIterator> template <class InputIterator>
Polygon_2(InputIterator first, InputIterator last) Polygon_2(InputIterator first, InputIterator last)
{ copy(first, last, back_inserter(d_container)); } { std::copy(first, last, std::back_inserter(d_container)); }
#endif #endif
//-------------------------------------------------------- //--------------------------------------------------------
@ -191,7 +191,7 @@ class Polygon_2 {
return; return;
typename _Container::iterator i = d_container.begin(); typename _Container::iterator i = d_container.begin();
reverse(++i, d_container.end()); std::reverse(++i, d_container.end());
} }
//-------------------------------------------------------- //--------------------------------------------------------

View File

@ -29,16 +29,16 @@ void test_polygon(const R&, const Point&, const char* FileName)
std::vector<Point> polygon; std::vector<Point> polygon;
from >> point; from >> point;
copy(istream_iterator<Point, ptrdiff_t>(from), std::copy(std::istream_iterator<Point, ptrdiff_t>(from),
istream_iterator<Point, ptrdiff_t>(), std::istream_iterator<Point, ptrdiff_t>(),
back_inserter(polygon) std::back_inserter(polygon)
); );
// show the point and the polygon // show the point and the polygon
cout << "point: " << point << endl; cout << "point: " << point << endl;
cout << "polygon:" << endl; cout << "polygon:" << endl;
copy(polygon.begin(), polygon.end(), std::copy(polygon.begin(), polygon.end(),
ostream_iterator<Point>(cout, "\n")); std::ostream_iterator<Point>(cout, "\n"));
cout << endl; cout << endl;
iterator left = iterator left =

View File

@ -86,9 +86,9 @@ void test_iterators(ListPolygon& p, const ListPolygon& q)
{ {
VC v = p.vertices_circulator(); VC v = p.vertices_circulator();
iterator_category(v); std::iterator_category(v);
value_type(v); std::value_type(v);
distance_type(v); std::distance_type(v);
VC vstart(v); VC vstart(v);
if (v != 0) if (v != 0)
@ -101,9 +101,9 @@ void test_iterators(ListPolygon& p, const ListPolygon& q)
cout << *vi << endl; cout << *vi << endl;
EC e = p.edges_circulator(); EC e = p.edges_circulator();
iterator_category(e); std::iterator_category(e);
value_type(e); std::value_type(e);
distance_type(e); std::distance_type(e);
EC estart(e); EC estart(e);
if (e != 0) if (e != 0)
@ -112,16 +112,16 @@ void test_iterators(ListPolygon& p, const ListPolygon& q)
++e; ++e;
} while (e != estart); } while (e != estart);
for (EI ei = p.edges_begin(); ei != p.edges_end(); ++ei) for (EI ei = p.edges_begin(); p.edges_end() != ei; ++ei)
cout << *ei << endl; cout << *ei << endl;
} }
//-------------------------------------------------------------------// //-------------------------------------------------------------------//
{ {
VCC v = q.vertices_circulator(); VCC v = q.vertices_circulator();
iterator_category(v); std::iterator_category(v);
value_type(v); std::value_type(v);
distance_type(v); std::distance_type(v);
VCC vstart(v); VCC vstart(v);
if (v != 0) if (v != 0)
@ -134,9 +134,9 @@ void test_iterators(ListPolygon& p, const ListPolygon& q)
cout << *vi << endl; cout << *vi << endl;
EC e = q.edges_circulator(); EC e = q.edges_circulator();
iterator_category(e); std::iterator_category(e);
value_type(e); std::value_type(e);
distance_type(e); std::distance_type(e);
EC estart(e); EC estart(e);
if (e != 0) if (e != 0)
@ -270,7 +270,7 @@ void test_update_operations(const ListPolygon& p,
VI middle = q.vertices_begin(); VI middle = q.vertices_begin();
VI last = q.vertices_end(); VI last = q.vertices_end();
++middle; ++middle;
rotate(first, middle, last); std::rotate(first, middle, last);
assert(p==q); assert(p==q);
// test update operations // test update operations