C++ conformance: calls to member templates of dependent names must be

qualified with the "template" keyword.

Example:
  template <typenam T>
  void f(T foobar) {
    foobar.get<0>().foobar(); // error
  }
must be written:

  foobar.template get<0>().foobar();
This commit is contained in:
Laurent Rineau 2010-05-16 16:50:24 +00:00
parent 0afa6b2fb0
commit 67928706cf
8 changed files with 35 additions and 35 deletions

View File

@ -106,17 +106,17 @@ public:
const Point_3 & center() const
{
return get(base).get<0>();
return get(base).template get<0>();
}
const FT & squared_radius() const
{
// Returns the square of the radius (instead of the radius itself,
// which would require square roots)
return get(base).get<1>();
return get(base).template get<1>();
}
Orientation orientation() const
{
return get(base).get<2>();
return get(base).template get<2>();
}
// A circle is degenerate if its (squared) radius is null or negative

View File

@ -56,7 +56,7 @@ namespace CGAL {
public:
const Sphere_3& reference_sphere(){
return get_ref_sphere(get(base).get<0>());
return get_ref_sphere(get(base).template get<0>());
};
@ -225,17 +225,17 @@ namespace CGAL {
const Circle_3& supporting_circle() const
{
return get(base).get<0>();
return get(base).template get<0>();
}
const Circular_arc_point_3& source() const
{
return get(base).get<1>();
return get(base).template get<1>();
}
const Circular_arc_point_3& target() const
{
return get(base).get<2>();
return get(base).template get<2>();
}
Plane_3 supporting_plane() const {

View File

@ -145,17 +145,17 @@ namespace CGAL {
const Line_3& supporting_line() const
{
return get(base).get<0>();
return get(base).template get<0>();
}
const Circular_arc_point_3& source() const
{
return get(base).get<1>();
return get(base).template get<1>();
}
const Circular_arc_point_3& target() const
{
return get(base).get<2>();
return get(base).template get<2>();
}
const Circular_arc_point_3& lower_xyz_extremity() const

View File

@ -114,13 +114,13 @@ template <class R>
inline
const typename CircleH2<R>::Point_2 &
CircleH2<R>::center() const
{ return get(base).get<0>(); }
{ return get(base).template get<0>(); }
template <class R>
inline
const typename CircleH2<R>::FT &
CircleH2<R>::squared_radius() const
{ return get(base).get<1>(); }
{ return get(base).template get<1>(); }
template <class R>
CGAL_KERNEL_INLINE
@ -136,7 +136,7 @@ template <class R>
inline
Orientation
CircleH2<R>::orientation() const
{ return get(base).get<2>(); }
{ return get(base).template get<2>(); }
template <class R>
CGAL_KERNEL_INLINE

View File

@ -180,19 +180,19 @@ template <class R>
inline
const typename SphereH3<R>::Point_3 &
SphereH3<R>::center() const
{ return get(base).get<0>(); }
{ return get(base).template get<0>(); }
template <class R>
inline
const typename SphereH3<R>::FT &
SphereH3<R>::squared_radius() const
{ return get(base).get<1>(); }
{ return get(base).template get<1>(); }
template <class R>
inline
Orientation
SphereH3<R>::orientation() const
{ return get(base).get<2>(); }
{ return get(base).template get<2>(); }
template <class R>
inline

View File

@ -2738,7 +2738,7 @@ inline void Periodic_3_triangulation_3<GT,TDS>::periodic_remove(Vertex_handle v,
// finally set the neighboring relations
for (unsigned int i=0 ; i<nr_vec.size() ; i++) {
nr_vec[i].get<0>()->set_neighbor(nr_vec[i].get<1>(),nr_vec[i].get<2>());
nr_vec[i].template get<0>()->set_neighbor(nr_vec[i].template get<1>(),nr_vec[i].template get<2>());
}
_tds.delete_vertex(v);

View File

@ -76,7 +76,7 @@ boost::optional< typename Traits::FT > compute_outer_frame_margin ( ForwardPoint
break ;
}
FT lSDist = CGAL::squared_distance(*lCurr,(*lP).get<0>());
FT lSDist = CGAL::squared_distance(*lCurr,(*lP).template get<0>());
if ( ! CGAL_NTS is_valid ( lSDist )
|| ! CGAL_NTS is_finite( lSDist )

View File

@ -87,7 +87,7 @@ protected:
bool operator()(const Pq_element &a1, const Pq_element
&a2)
{
return a1.get<3>().second < a2.get<3>().second ;
return a1.template get<3>().second < a2.template get<3>().second ;
}
};
std::priority_queue<Pq_element, std::vector<Pq_element>, C> pq;
@ -180,7 +180,7 @@ public:
std::pair<Point_2, FT> get_biggest_circle()
{
Pq_element m_Pq = Biggest_circle;
std::pair<Point_2, FT> circle(m_Pq.get<3>().first, m_Pq.get<3>().second);
std::pair<Point_2, FT> circle(m_Pq.template get<3>().first, m_Pq.template get<3>().second);
return circle;
}
protected:
@ -676,10 +676,10 @@ pq_elements(const Vector_field_2 & vector_field_2, Vertex_container_2 stl_vertic
else
{
Pq_next_r = m_Pq_element;
if (Pq_element_max_r.get<3>().second <= Pq_next_r.get<3>().second)
if (Pq_element_max_r.template get<3>().second <= Pq_next_r.template get<3>().second)
Pq_element_max_r = Pq_next_r;
if ((Pq_current_r.get<3>().second>=Pq_previous_r.get<3>().second)
&&(Pq_current_r.get<3>().second>=Pq_next_r.get<3>().second))
if ((Pq_current_r.template get<3>().second>=Pq_previous_r.template get<3>().second)
&&(Pq_current_r.template get<3>().second>=Pq_next_r.template get<3>().second))
{
pq.push(Pq_current_r);
}
@ -714,10 +714,10 @@ pq_elements(const Vector_field_2 & vector_field_2, Vertex_container_2 stl_vertic
else
{
Pq_next_l = m_Pq_element;
if (Pq_element_max_l.get<3>().second <= Pq_next_l.get<3>().second)
if (Pq_element_max_l.template get<3>().second <= Pq_next_l.template get<3>().second)
Pq_element_max_l = Pq_next_l;
if ((Pq_current_l.get<3>().second>=Pq_previous_l.get<3>().second)
&&(Pq_current_l.get<3>().second>=Pq_next_l.get<3>().second))
if ((Pq_current_l.template get<3>().second>=Pq_previous_l.template get<3>().second)
&&(Pq_current_l.template get<3>().second>=Pq_next_l.template get<3>().second))
{
pq.push(Pq_current_l);
}
@ -773,14 +773,14 @@ Stream_lines_2<VectorField_2, Integrator_2>::get_next_seed_point(FT &
do{
CGAL_assertion(!pq.empty());
m_Pq_element = pq.top();
v0 = m_Pq_element.get<0>();
v1 = m_Pq_element.get<1>();
v2 = m_Pq_element.get<2>();
distance = m_Pq_element.get<3>().second;
v0 = m_Pq_element.template get<0>();
v1 = m_Pq_element.template get<1>();
v2 = m_Pq_element.template get<2>();
distance = m_Pq_element.template get<3>().second;
pq.pop();
b0 = m_DT.is_face(v0,v1,v2,fr);
if (b0){
seed_point_ = m_Pq_element.get<3>().first;}
seed_point_ = m_Pq_element.template get<3>().first;}
b = (!pq.empty());
}while ((b)&&(!b0));
Biggest_circle = m_Pq_element;
@ -893,13 +893,13 @@ Stream_lines_2<VectorField_2, Integrator_2>::get_pq()
while (!pq_temp.empty())
{
Pq_element m_Pq_element = pq_temp.top();
Vertex_handle v0 = m_Pq_element.get<0>();
Vertex_handle v1 = m_Pq_element.get<1>();
Vertex_handle v2 = m_Pq_element.get<2>();
Vertex_handle v0 = m_Pq_element.template get<0>();
Vertex_handle v1 = m_Pq_element.template get<1>();
Vertex_handle v2 = m_Pq_element.template get<2>();
pq_temp.pop();
Face_handle fr;
bool b0 = m_DT.is_face(v0,v1,v2,fr);
Point_2 sdPoint = m_Pq_element.get<3>().first;
Point_2 sdPoint = m_Pq_element.template get<3>().first;
if (b0)
_list.push_front(sdPoint);
}