From: Wolfgang Bangerth Date: Sun, 24 May 1998 21:05:06 +0000 (+0000) Subject: Move code closer to the C++ standard and small changes. X-Git-Tag: v8.0.0~22914 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=266d7c164a63b0c54c44b88db0cb40aef744e94a;p=dealii.git Move code closer to the C++ standard and small changes. git-svn-id: https://svn.dealii.org/trunk@340 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/include/grid/point.h b/deal.II/deal.II/include/grid/point.h index eaaf99b11e..64d14a7bf0 100644 --- a/deal.II/deal.II/include/grid/point.h +++ b/deal.II/deal.II/include/grid/point.h @@ -178,12 +178,12 @@ class Point { double coordinates[dim]; }; -// /** -// * Prints the coordinates of this point in the -// * form #(x1,x2,x3,etc)#. -// */ -//template -//ostream & operator << (ostream &out, const Point &p); + /** + * Prints the coordinates of this point in the + * form #x1 x2 x3 etc#. + */ +template +ostream & operator << (ostream &out, const Point &p); @@ -205,6 +205,7 @@ Point::Point () { +template <> inline Point<1>::Point (const double x) { coordinates[0] = x; @@ -212,6 +213,7 @@ Point<1>::Point (const double x) { +template <> inline Point<2>::Point (const double x, const double y) { coordinates[0] = x; @@ -220,6 +222,7 @@ Point<2>::Point (const double x, const double y) { +template <> inline Point<3>::Point (const double x, const double y, const double z) { coordinates[0] = x; @@ -386,20 +389,11 @@ double Point::square () const { +template inline -ostream & operator << (ostream &out, const Point<1> &p) { - out << p(0); - return out; -}; - - -inline -ostream & operator << (ostream &out, const Point<2> &p) { -// out << "("; -// for (unsigned int i=0; i<1; i++) -// out << p(i) << ","; -// out << p(1) << ")"; - out << p(0) << " " << p(1); +ostream & operator << (ostream &out, const Point &p) { + for (unsigned int i=0; i