diff --git a/STL_Extension/include/CGAL/Compact_container.h b/STL_Extension/include/CGAL/Compact_container.h index ad10438d026..485dbb2b51c 100644 --- a/STL_Extension/include/CGAL/Compact_container.h +++ b/STL_Extension/include/CGAL/Compact_container.h @@ -1166,12 +1166,15 @@ public: } }; -struct With_point_tag { +struct With_offset_tag { int offset = 0; }; +struct With_point_tag : public With_offset_tag { +}; + template -struct Output_rep, With_point_tag> +struct Output_rep, With_offset_tag> : public Output_rep> { int offset = 0; @@ -1182,11 +1185,30 @@ struct Output_rep, With_point_tag> using Base = Output_rep; using Base::Base; - Output_rep(const CC_iterator it, With_point_tag tag = {}) + Output_rep(const CC_iterator it, With_offset_tag tag = {}) : Base(it), offset(tag.offset) {} std::ostream& operator()(std::ostream& out) const { out << Time_stamper::display_id(this->it.operator->(), offset); + return out; + } +}; + +template +struct Output_rep, With_point_tag> + : public Output_rep, With_offset_tag> +{ + using CC_iterator = CGAL::internal::CC_iterator; + using Base = Output_rep; + using Time_stamper = Base::Time_stamper; + + using Base::Base; + + Output_rep(const CC_iterator it, With_point_tag tag = {}) + : Base(it, tag) {} + + std::ostream& operator()(std::ostream& out) const { + this->Base::operator()(out); if(this->it.operator->() != nullptr) { if(Time_stamper::time_stamp(this->it.operator->()) == 0) return out << "= infinite_vertex()"; @@ -1214,7 +1236,6 @@ namespace std { }; #endif // CGAL_CFG_NO_STD_HASH - } // namespace std #include