diff --git a/Cartesian_kernel/include/CGAL/Cartesian/Tetrahedron_3.h b/Cartesian_kernel/include/CGAL/Cartesian/Tetrahedron_3.h index 5d66dced742..56013954374 100644 --- a/Cartesian_kernel/include/CGAL/Cartesian/Tetrahedron_3.h +++ b/Cartesian_kernel/include/CGAL/Cartesian/Tetrahedron_3.h @@ -229,39 +229,6 @@ TetrahedronC3::bbox() const + construct_bbox_3(vertex(2)) + construct_bbox_3(vertex(3)); } -#ifndef CGAL_NO_OSTREAM_INSERT_TETRAHEDRONC3 -template < class R > -std::ostream & -operator<<(std::ostream &os, const TetrahedronC3 &t) -{ - switch(os.iword(IO::mode)) { - case IO::ASCII : - return os << t[0] << ' ' << t[1] << ' ' << t[2] << ' ' << t[3]; - case IO::BINARY : - return os << t[0] << t[1] << t[2] << t[3]; - default: - os << "TetrahedronC3(" << t[0] << ", " << t[1] << ", " << t[2]; - os << ", " << t[3] << ")"; - return os; - } -} -#endif // CGAL_NO_OSTREAM_INSERT_TETRAHEDRONC3 - -#ifndef CGAL_NO_ISTREAM_EXTRACT_TETRAHEDRONC3 -template < class R > -std::istream & -operator>>(std::istream &is, TetrahedronC3 &t) -{ - typename R::Point_3 p, q, r, s; - - is >> p >> q >> r >> s; - - if (is) - t = TetrahedronC3(p, q, r, s); - return is; -} -#endif // CGAL_NO_ISTREAM_EXTRACT_TETRAHEDRONC3 - CGAL_END_NAMESPACE #endif // CGAL_CARTESIAN_TETRAHEDRON_3_H diff --git a/Kernel_23/include/CGAL/Tetrahedron_3.h b/Kernel_23/include/CGAL/Tetrahedron_3.h index dc3ea88f738..587e19ea125 100644 --- a/Kernel_23/include/CGAL/Tetrahedron_3.h +++ b/Kernel_23/include/CGAL/Tetrahedron_3.h @@ -133,25 +133,35 @@ public: }; -#ifndef CGAL_NO_OSTREAM_INSERT_TETRAHEDRON_3 -template < class R > -std::ostream& -operator<<(std::ostream& os, const Tetrahedron_3& t) -{ - typedef typename R::Kernel_base::Tetrahedron_3 Rep; - return os << static_cast(t); -} -#endif // CGAL_NO_OSTREAM_INSERT_TETRAHEDRON_3 -#ifndef CGAL_NO_ISTREAM_EXTRACT_TETRAHEDRON_3 template < class R > -std::istream& -operator>>(std::istream& is, Tetrahedron_3& t) +std::ostream & +operator<<(std::ostream &os, const Tetrahedron_3 &t) { - typedef typename R::Kernel_base::Tetrahedron_3 Rep; - return is >> static_cast(t); + switch(os.iword(IO::mode)) { + case IO::ASCII : + return os << t[0] << ' ' << t[1] << ' ' << t[2] << ' ' << t[3]; + case IO::BINARY : + return os << t[0] << t[1] << t[2] << t[3]; + default: + os << "Tetrahedron_3(" << t[0] << ", " << t[1] << ", " << t[2]; + os << ", " << t[3] << ")"; + return os; + } +} + +template < class R > +std::istream & +operator>>(std::istream &is, Tetrahedron_3 &t) +{ + typename R::Point_3 p, q, r, s; + + is >> p >> q >> r >> s; + + if (is) + t = Tetrahedron_3(p, q, r, s); + return is; } -#endif // CGAL_NO_ISTREAM_EXTRACT_TETRAHEDRON_3 CGAL_END_NAMESPACE