diff --git a/Algebraic_foundations/test/Algebraic_foundations/Chinese_remainder_traits.cpp b/Algebraic_foundations/test/Algebraic_foundations/Chinese_remainder_traits.cpp index b28013d6fcb..d38315a4de9 100644 --- a/Algebraic_foundations/test/Algebraic_foundations/Chinese_remainder_traits.cpp +++ b/Algebraic_foundations/test/Algebraic_foundations/Chinese_remainder_traits.cpp @@ -35,6 +35,7 @@ #include #include #include +#include #include @@ -81,7 +82,7 @@ void test_CR_for(const NT& f){ CGAL::Set_ieee_double_precision pfr; typedef CGAL::Modular_traits MT; - typedef typename CGAL::Modular_traits::Residue_type MNT; + CGAL_USE_TYPE(typename CGAL::Modular_traits::Residue_type); typename MT::Modular_image modular_image; typename MT::Modular_image_representative modular_image_representative; diff --git a/Apollonius_graph_2/test/Apollonius_graph_2/include/test.h b/Apollonius_graph_2/test/Apollonius_graph_2/include/test.h index e62c31be2ce..8bc47018b44 100644 --- a/Apollonius_graph_2/test/Apollonius_graph_2/include/test.h +++ b/Apollonius_graph_2/test/Apollonius_graph_2/include/test.h @@ -4,7 +4,7 @@ #include #include #include -#include +#include #include // this is done in order to avoid error // when the Segment_2_Segment_2_intersection.h file is included from @@ -129,6 +129,12 @@ bool test_traits_base(const Traits& = Traits()) typedef typename Traits::Is_degenerate_edge_2 Is_degenerate_edge_2; + CGAL_USE_TYPE(FT); + CGAL_USE_TYPE(RT); + CGAL_USE_TYPE(Object_2); + CGAL_USE_TYPE(Line_2); + CGAL_USE_TYPE(Ray_2); + CGAL_USE_TYPE(Segment_2); // testing constructors //-------------------------------------------------------------------- @@ -503,6 +509,9 @@ bool test_algo_generic(InputStream& is) typedef typename Apollonius_graph::size_type size_type; + CGAL_USE_TYPE(Data_structure); + CGAL_USE_TYPE(Point_2); + CGAL_USE_TYPE(Edge); Null_output_stream nos; diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/EnvelopeCallback.h b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/EnvelopeCallback.h index 7c4f9c48f35..8bb9cb70fd0 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/EnvelopeCallback.h +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/EnvelopeCallback.h @@ -277,7 +277,6 @@ void EnvelopeCallback< Arr_, Traits >:: updateEnvelope(bool lower, CGAL::Arr_circular_arc_traits_2< CircularKernel > /* traits */) { - typedef Kernel_point_2 Non_arc_point_2; typedef typename Traits::Point_2 Arc_point_2; CGAL::Qt::CurveGraphicsItem< Traits >* envelopeToUpdate; if ( lower ) diff --git a/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_polygon_validation.h b/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_polygon_validation.h index 980e0eea61c..765c9811e6b 100644 --- a/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_polygon_validation.h +++ b/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_polygon_validation.h @@ -231,8 +231,6 @@ bool is_closed_polygon(const typename Traits_2::Polygon_2& pgn, Traits_2 traits) template bool is_simple_polygon(const typename Traits_2::Polygon_2& pgn, Traits_2 traits) { - - typedef Gps_traits_adaptor Traits_adapter_2; typedef typename Traits_2::Curve_const_iterator Curve_const_iterator; typedef std::pair Cci_pair; @@ -342,8 +340,6 @@ bool is_crossover_outer_boundary(const typename Traits_2::Polygon_with_holes_2& pgn, Traits_2 traits, PointLocation& pl) { - - typedef Gps_traits_adaptor Traits_adapter_2; typedef typename Traits_2::Curve_const_iterator Curve_const_iterator; typedef std::pair Cci_pair; @@ -489,8 +485,6 @@ template bool is_relatively_simple_polygon_with_holes (const typename Traits_2::Polygon_with_holes_2& pgn, Traits_2 traits) { - - typedef Gps_traits_adaptor Traits_adapter_2; typedef typename Traits_2::Curve_const_iterator Curve_const_iterator; typedef std::pair Cci_pair; typedef typename Traits_2::Construct_curves_2 Construct_curves_2; @@ -554,7 +548,6 @@ bool has_valid_orientation_polygon_with_holes typedef std::pair Cci_pair; typedef typename Traits_2::Construct_curves_2 Construct_curves_2; - typedef Gps_polygon_validation_visitor Visitor; typedef typename Traits_adapter_2::Orientation_2 Check_orientation_2; typedef typename Traits_2::Polygon_with_holes_2 Polygon_with_holes_2; @@ -606,8 +599,6 @@ template bool are_holes_and_boundary_pairwise_disjoint (const typename Traits_2::Polygon_with_holes_2& pwh, Traits_2& traits) { - - typedef Gps_traits_adaptor Traits_adapter_2; typedef typename Traits_2::Curve_const_iterator Curve_const_iterator; typedef std::pair Cci_pair; typedef typename Traits_2::Construct_curves_2 Construct_curves_2; @@ -632,7 +623,7 @@ bool are_holes_and_boundary_pairwise_disjoint typedef typename Traits_2::Construct_curves_2 Construct_curves_2; typedef typename Traits_2::Construct_general_polygon_with_holes_2 Construct_polygon_with_holes_2; - typedef typename Traits_adapter_2::Construct_vertex_2 Construct_vertex_2; + typedef Gps_polygon_validation_visitor Visitor; typedef Sweep_line_2 Sweep_line ; typedef typename Polygon_set_2::Arrangement_on_surface_2 Arrangement_2; diff --git a/Bounding_volumes/test/Bounding_volumes/test_Min_circle.cpp b/Bounding_volumes/test/Bounding_volumes/test_Min_circle.cpp index c41e2b4eb8d..94895d6cb42 100644 --- a/Bounding_volumes/test/Bounding_volumes/test_Min_circle.cpp +++ b/Bounding_volumes/test/Bounding_volumes/test_Min_circle.cpp @@ -32,6 +32,7 @@ #include #include #include +#include #include #include #include @@ -61,7 +62,7 @@ cover_Min_circle_2( bool verbose, const Traits&, const RT&) typedef CGAL::Min_circle_2< Traits > Min_circle; typedef typename Min_circle::Point Point; - typedef typename Min_circle::Circle Circle; + CGAL_USE_TYPE(typename Min_circle::Circle); CGAL::Verbose_ostream verr( verbose); @@ -441,7 +442,6 @@ main( int argc, char* argv[]) typedef CGAL::Min_circle_2< TraitsH > Min_circle; typedef Min_circle::Point Point; - typedef Min_circle::Circle Circle; CGAL::Verbose_ostream verr( verbose); diff --git a/Bounding_volumes/test/Bounding_volumes/test_Min_ellipse_2.cpp b/Bounding_volumes/test/Bounding_volumes/test_Min_ellipse_2.cpp index 9ac1d86846d..323c08789b2 100644 --- a/Bounding_volumes/test/Bounding_volumes/test_Min_ellipse_2.cpp +++ b/Bounding_volumes/test/Bounding_volumes/test_Min_ellipse_2.cpp @@ -32,6 +32,7 @@ #include #include #include +#include #include #include #include @@ -90,7 +91,7 @@ core_test_Min_ellipse_2( bool verbose, const Traits&) typedef CGAL::Min_ellipse_2< Traits > Min_ellipse; typedef typename Min_ellipse::Point Point; - typedef typename Min_ellipse::Ellipse Ellipse; + CGAL_USE_TYPE(typename Min_ellipse::Ellipse); CGAL::Verbose_ostream verr( verbose); @@ -155,7 +156,6 @@ double_test_Min_ellipse_2( bool verbose, const Traits&, const Conic&) typedef CGAL::Min_ellipse_2< Traits > Min_ellipse; typedef typename Min_ellipse::Point Point; - typedef typename Min_ellipse::Ellipse Ellipse; CGAL::Verbose_ostream verr( verbose); @@ -226,7 +226,6 @@ cover_Min_ellipse_2( bool verbose, const Traits&, const RT&) typedef CGAL::Min_ellipse_2< Traits > Min_ellipse; typedef typename Min_ellipse::Point Point; - typedef typename Min_ellipse::Ellipse Ellipse; CGAL::Verbose_ostream verr( verbose); @@ -648,7 +647,6 @@ main( int argc, char* argv[]) typedef CGAL::Min_ellipse_2< TraitsH > Min_ellipse; typedef Min_ellipse::Point Point; - typedef Min_ellipse::Ellipse Ellipse; CGAL::Verbose_ostream verr( verbose); diff --git a/Circular_kernel_2/include/CGAL/Circular_kernel_2/internal_functions_on_line_arc_2.h b/Circular_kernel_2/include/CGAL/Circular_kernel_2/internal_functions_on_line_arc_2.h index 43c069ea93d..6b4f1669013 100644 --- a/Circular_kernel_2/include/CGAL/Circular_kernel_2/internal_functions_on_line_arc_2.h +++ b/Circular_kernel_2/include/CGAL/Circular_kernel_2/internal_functions_on_line_arc_2.h @@ -554,12 +554,10 @@ namespace CircularFunctors { const typename CK::Circular_arc_2 &c, OutputIterator res ) { - typedef typename CK::Circular_arc_2 Circular_arc_2; - typedef typename CK::Circular_arc_point_2 Circular_arc_point_2; - typedef typename CK::Line_arc_2 Line_arc_2; typedef std::vector solutions_container; #ifdef CGAL_CK_EXPLOIT_IDENTITY + typedef typename CK::Circular_arc_point_2 Circular_arc_point_2; bool ls_cs = l.source().equal_ref(c.source()); bool ls_ct = l.source().equal_ref(c.target()); bool lt_cs = l.target().equal_ref(c.source()); @@ -659,6 +657,7 @@ namespace CircularFunctors { solutions_container solutions; #ifdef CGAL_INTERSECTION_MAP_FOR_SUPPORTING_CIRCLES + typedef typename CK::Line_arc_2 Line_arc_2; if(!Line_arc_2::template find_intersection_circle_line< solutions_container > (c,l,solutions)) { @@ -752,9 +751,7 @@ namespace CircularFunctors { OutputIterator res ) { typedef typename CK::Circular_arc_point_2 Circular_arc_point_2; - typedef typename CK::Line_arc_2 Line_arc_2; typedef typename CK::Point_2 Point_2; - typedef typename CK::Line_2 Line_2; if(LinearFunctors::non_oriented_equal(l, la.supporting_line())) { *res++ = make_object(la); @@ -778,7 +775,6 @@ namespace CircularFunctors { const typename CK::Circular_arc_2 &c, OutputIterator res ) { - typedef typename CK::Circular_arc_2 Circular_arc_2; typedef typename CK::Circular_arc_point_2 Circular_arc_point_2; typedef std::vector solutions_container; @@ -790,9 +786,9 @@ namespace CircularFunctors { for (typename solutions_container::iterator it = solutions.begin(); it != solutions.end(); ++it) { - const std::pair + const std::pair *result = CGAL::object_cast - > (&(*it)); + > (&(*it)); if (has_on(c,result->first,true)) { *res++ = *it; } diff --git a/Interval_support/include/CGAL/Test/_test_bigfloat_interval_traits.h b/Interval_support/include/CGAL/Test/_test_bigfloat_interval_traits.h index 7a74bc11733..c70ddf6627d 100644 --- a/Interval_support/include/CGAL/Test/_test_bigfloat_interval_traits.h +++ b/Interval_support/include/CGAL/Test/_test_bigfloat_interval_traits.h @@ -29,6 +29,7 @@ #include #include +#include #include @@ -42,7 +43,7 @@ void test_bigfloat_interval_traits() { typedef typename CGAL::Bigfloat_interval_traits::Self BFIT; typedef typename BFIT::Type BFI; - typedef typename BFIT::Bound BF; + CGAL_USE_TYPE(typename BFIT::Bound); typedef typename BFIT::Is_bigfloat_interval Is_bigfloat_interval; // using CGAL::Tag_true; diff --git a/Number_types/test/Number_types/include/CGAL/_test_utilities.h b/Number_types/test/Number_types/include/CGAL/_test_utilities.h index 7a6ce5f2967..dab2a54224b 100644 --- a/Number_types/test/Number_types/include/CGAL/_test_utilities.h +++ b/Number_types/test/Number_types/include/CGAL/_test_utilities.h @@ -23,6 +23,7 @@ #define CGAL_TEST_UTILITIES_H #include +#include #include #include #include @@ -30,10 +31,6 @@ namespace CGAL { -// Used to shut down some warnings about unused variables. -template < class T > -void use(const T&) {} - template < class NT, class Sqrt> bool test_sqrt(const NT&, Sqrt) @@ -123,7 +120,7 @@ test_basic_operators(const NT&) d = a==b; d = a!=b; - use(a); use(b); use(d); + CGAL_USE(a); CGAL_USE(b); CGAL_USE(d); return true; } diff --git a/Periodic_3_triangulation_3/demo/Periodic_3_triangulation_3/Scene.cpp b/Periodic_3_triangulation_3/demo/Periodic_3_triangulation_3/Scene.cpp index 8d9472d8405..49a8d822cc4 100644 --- a/Periodic_3_triangulation_3/demo/Periodic_3_triangulation_3/Scene.cpp +++ b/Periodic_3_triangulation_3/demo/Periodic_3_triangulation_3/Scene.cpp @@ -70,7 +70,6 @@ void Scene::load_points(const QString& fileName) { std::back_inserter(points)); std::random_shuffle(points.begin(), points.end()); p3dt.insert(points.begin(), points.end()); - Vertex_iterator vit = p3dt.vertices_begin(); make_draw_list(); diff --git a/Polynomial/include/CGAL/Test/_test_polynomial_traits_d.h b/Polynomial/include/CGAL/Test/_test_polynomial_traits_d.h index 2773ba75e28..435f97753e6 100644 --- a/Polynomial/include/CGAL/Test/_test_polynomial_traits_d.h +++ b/Polynomial/include/CGAL/Test/_test_polynomial_traits_d.h @@ -24,6 +24,7 @@ #include #include +#include #include #include #include @@ -47,7 +48,10 @@ static CGAL::Random my_rnd(346); // some seed typedef typename PT::Innermost_coefficient_type ICoeff; \ typedef CGAL::Polynomial_traits_d PTC; \ typedef CGAL::Exponent_vector Exponent_vector; \ - typedef std::pair< CGAL::Exponent_vector , ICoeff > Monom; + typedef std::pair< CGAL::Exponent_vector , ICoeff > Monom;\ + CGAL_USE_TYPE(PTC);\ + CGAL_USE_TYPE(Exponent_vector);\ + CGAL_USE_TYPE(Monom) #define ASSERT_IS_NULL_FUNCTOR(T) \ @@ -102,7 +106,15 @@ generate_sparse_random_polynomial(int max_degree = 10){ } template class Construct_test_polynomial { - CGAL_SNAP_CGALi_TRAITS_D(Polynomial_traits_d) + + typedef Polynomial_traits_d PT; + typedef typename PT::Polynomial_d Polynomial_d; + typedef typename PT::Coefficient_type Coeff; + typedef typename PT::Innermost_coefficient_type ICoeff; + typedef CGAL::Polynomial_traits_d PTC; + typedef CGAL::Exponent_vector Exponent_vector; + typedef std::pair< CGAL::Exponent_vector , ICoeff > Monom; + typedef typename PT::Construct_polynomial Constructor; public: diff --git a/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_triangulation_simplex_3.h b/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_triangulation_simplex_3.h index 1516d700fe6..c180ac721d0 100644 --- a/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_triangulation_simplex_3.h +++ b/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_triangulation_simplex_3.h @@ -56,6 +56,7 @@ _test_cls_triangulation_simplex_3(const Triangulation &) typedef typename Cls::Finite_facets_iterator Finite_facets_iterator; typedef typename Cls::Finite_cells_iterator Finite_cells_iterator; + CGAL_USE_TYPE(Vertex); CGAL_USE_TYPE(Cell); CGAL_USE_TYPE(size_type); CGAL_USE_TYPE(difference_type);