aboutsummaryrefslogtreecommitdiff
path: root/Carpet/CarpetLib/src/bbox.cc
diff options
context:
space:
mode:
Diffstat (limited to 'Carpet/CarpetLib/src/bbox.cc')
-rw-r--r--Carpet/CarpetLib/src/bbox.cc25
1 files changed, 23 insertions, 2 deletions
diff --git a/Carpet/CarpetLib/src/bbox.cc b/Carpet/CarpetLib/src/bbox.cc
index de281f582..f90c14d4e 100644
--- a/Carpet/CarpetLib/src/bbox.cc
+++ b/Carpet/CarpetLib/src/bbox.cc
@@ -5,7 +5,7 @@
copyright : (C) 2000 by Erik Schnetter
email : schnetter@astro.psu.edu
- $Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetLib/src/bbox.cc,v 1.4 2001/03/12 16:54:25 eschnett Exp $
+ $Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetLib/src/bbox.cc,v 1.5 2001/03/22 18:42:05 eschnett Exp $
***************************************************************************/
@@ -18,7 +18,8 @@
* *
***************************************************************************/
-#include <cassert>
+#include <assert.h>
+
#include <iostream>
#include "defs.hh"
@@ -28,6 +29,8 @@
# include "bbox.hh"
#endif
+using namespace std;
+
// Constructors
@@ -223,19 +226,37 @@ bbox<T,D>::iterator bbox<T,D>::end () const {
// Output
+#ifndef SGI
+// This doesn't work on SGIs. Is this legal C++?
template<class T,int D>
ostream& operator<< (ostream& os, const bbox<T,D>& b) {
os << "(" << b.lower() << ":" << b.upper() << ":" << b.stride() << ")";
return os;
}
+#else
+ostream& operator<< (ostream& os, const bbox<int,1>& b) {
+ os << "(" << b.lower() << ":" << b.upper() << ":" << b.stride() << ")";
+ return os;
+}
+ostream& operator<< (ostream& os, const bbox<int,2>& b) {
+ os << "(" << b.lower() << ":" << b.upper() << ":" << b.stride() << ")";
+ return os;
+}
+ostream& operator<< (ostream& os, const bbox<int,3>& b) {
+ os << "(" << b.lower() << ":" << b.upper() << ":" << b.stride() << ")";
+ return os;
+}
+#endif
#if defined(TMPL_EXPLICIT)
template class bbox<int,1>;
template ostream& operator<< (ostream& os, const bbox<int,1>& b);
+
template class bbox<int,2>;
template ostream& operator<< (ostream& os, const bbox<int,2>& b);
+
template class bbox<int,3>;
template ostream& operator<< (ostream& os, const bbox<int,3>& b);
#endif