mirror of https://github.com/CGAL/cgal
Merge branch 'CGAL-misc_warnings-GF'
Approved by the release manager
This commit is contained in:
commit
2cee9fc33e
|
|
@ -27,6 +27,7 @@
|
|||
|
||||
#include <cassert>
|
||||
#include <CGAL/tags.h>
|
||||
#include <CGAL/use.h>
|
||||
#include <CGAL/number_type_config.h>
|
||||
#include <CGAL/number_utils.h>
|
||||
#include <CGAL/Algebraic_structure_traits.h>
|
||||
|
|
@ -352,7 +353,7 @@ void test_explicit_interoperable_one_way(){
|
|||
typedef typename CT::Type Type;
|
||||
typedef typename CT::Cast Cast;
|
||||
typedef typename Cast::result_type result_type;
|
||||
|
||||
CGAL_USE_TYPE(result_type);
|
||||
CGAL_static_assertion((::boost::is_same<result_type,Type>::value));
|
||||
CGAL_static_assertion((::boost::is_same< typename CT::Are_explicit_interoperable,CGAL::Tag_true>::value));
|
||||
CGAL_static_assertion((::boost::is_same<Type,RT>::value));
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@
|
|||
#include <CGAL/basic.h>
|
||||
#include <cassert>
|
||||
#include <CGAL/to_rational.h>
|
||||
#include <CGAL/use.h>
|
||||
|
||||
#ifndef CGAL_TEST_FRACTION_TRAITS_H
|
||||
#define CGAL_TEST_FRACTION_TRAITS_H
|
||||
|
|
@ -44,6 +45,7 @@ void test_fraction_traits(){
|
|||
typedef typename FT::Decompose Decompose;
|
||||
typedef typename FT::Compose Compose;
|
||||
|
||||
CGAL_USE_TYPE(Is_fraction);
|
||||
CGAL_static_assertion( (::boost::is_same<Type,T>::value));
|
||||
CGAL_static_assertion( (::boost::is_same<Is_fraction,Tag_true>::value));
|
||||
CGAL_static_assertion(!(::boost::is_same<Common_factor,Null_functor>::value));
|
||||
|
|
|
|||
|
|
@ -33,8 +33,8 @@ VerticalRayGraphicsItem::VerticalRayGraphicsItem( ) :
|
|||
{}
|
||||
|
||||
void VerticalRayGraphicsItem::paint( QPainter* painter,
|
||||
const QStyleOptionGraphicsItem* option,
|
||||
QWidget* widget )
|
||||
const QStyleOptionGraphicsItem* /* option*/,
|
||||
QWidget* /* widget */ )
|
||||
{
|
||||
QPen rayPen( this->m_color, this->m_width );
|
||||
painter->setPen( rayPen );
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@ void test_bigfloat_interval_traits() {
|
|||
CGAL_USE_TYPE(typename BFIT::Bound);
|
||||
|
||||
typedef typename BFIT::Is_bigfloat_interval Is_bigfloat_interval;
|
||||
CGAL_USE_TYPE(Is_bigfloat_interval);
|
||||
// using CGAL::Tag_true;
|
||||
CGAL_static_assertion(( ::boost::is_same< Is_bigfloat_interval, CGAL::Tag_true>::value));
|
||||
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@
|
|||
|
||||
#include <cassert>
|
||||
#include <CGAL/tags.h>
|
||||
#include <CGAL/use.h>
|
||||
|
||||
#include <CGAL/convert_to_bfi.h>
|
||||
#include <CGAL/Sqrt_extension.h>
|
||||
|
|
@ -46,6 +47,7 @@ void test_convert_to_bfi_from(BFI,CGAL::Null_tag){return;}
|
|||
template <typename BFI, typename From>
|
||||
void test_convert_to_bfi_from(BFI,From){
|
||||
typedef typename CGAL::Coercion_traits<BFI,From>::Type CT_type;
|
||||
CGAL_USE_TYPE(CT_type);
|
||||
CGAL_static_assertion(( ::boost::is_same<CT_type, BFI>::value));
|
||||
assert(CGAL::convert_to_bfi(From(0)) == BFI(0));
|
||||
assert(CGAL::convert_to_bfi(From(1)) == BFI(1));
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@
|
|||
|
||||
#include <cassert>
|
||||
#include <CGAL/tags.h>
|
||||
#include <CGAL/use.h>
|
||||
|
||||
#include <CGAL/Interval_traits.h>
|
||||
|
||||
|
|
@ -42,6 +43,7 @@ template <class Interval>
|
|||
void test_with_empty_interval(CGAL::Tag_false) {
|
||||
typedef CGAL::Interval_traits<Interval> IT;
|
||||
typedef typename IT::Empty Empty;
|
||||
CGAL_USE_TYPE(Empty);
|
||||
CGAL_static_assertion(
|
||||
(::boost::is_same< Empty, CGAL::Null_functor>::value));
|
||||
|
||||
|
|
@ -78,7 +80,7 @@ void test_interval_traits() {
|
|||
typedef typename IT::Bound Bound;
|
||||
typedef typename IT::Is_interval Is_interval;
|
||||
typedef typename IT::With_empty_interval With_empty_interval;
|
||||
|
||||
CGAL_USE_TYPE(Is_interval);
|
||||
using CGAL::Tag_true;
|
||||
CGAL_static_assertion(( ::boost::is_same< Is_interval, Tag_true>::value));
|
||||
CGAL_static_assertion(( ::boost::is_same< Interval_, Interval>::value));
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@
|
|||
|
||||
#include <CGAL/number_type_basic.h>
|
||||
#include <CGAL/to_rational.h>
|
||||
#include <CGAL/use.h>
|
||||
#include <climits>
|
||||
#include <cmath>
|
||||
|
||||
|
|
@ -49,8 +50,10 @@ simplest_rational_in_interval(double x, double y) {
|
|||
typedef typename FT::Compose Compose;
|
||||
|
||||
// Must be a fraction
|
||||
CGAL_USE_TYPE(Is_fraction);
|
||||
CGAL_static_assertion((::boost::is_same<Is_fraction, Tag_true>::value));
|
||||
// Numerator_type,Denominator_type must be the same
|
||||
CGAL_USE_TYPE(Denominator_type);
|
||||
CGAL_static_assertion((::boost::is_same<Numerator_type, Denominator_type>::value));
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#include <iostream>
|
||||
#include <CGAL/basic.h>
|
||||
#include <CGAL/use.h>
|
||||
#include <CGAL/Arithmetic_kernel.h>
|
||||
#include <CGAL/Quotient.h>
|
||||
#include <CGAL/Test/_test_algebraic_structure.h>
|
||||
|
|
@ -60,6 +61,7 @@ void test_quotient() {
|
|||
typedef typename AT::Integer I ;
|
||||
typedef CGAL::Quotient<typename AT::Integer> QI;
|
||||
typedef CGAL::Coercion_traits<I,QI> CT;
|
||||
CGAL_USE_TYPE(CT);
|
||||
CGAL_static_assertion((boost::is_same< typename CT::Are_explicit_interoperable,CGAL::Tag_true>::value));
|
||||
CGAL_static_assertion((boost::is_same< typename CT::Are_implicit_interoperable,CGAL::Tag_true>::value));
|
||||
CGAL_static_assertion((boost::is_same< typename CT::Type,QI>::value));
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
|
||||
#include <CGAL/use.h>
|
||||
#include <CGAL/Arithmetic_kernel.h>
|
||||
#include <CGAL/Sqrt_extension.h>
|
||||
#include <CGAL/convert_to_bfi.h>
|
||||
|
|
@ -20,6 +21,7 @@ inline
|
|||
void convert_to(const NT& x, RT& r){
|
||||
typedef CGAL::Coercion_traits<NT,RT> CT;
|
||||
typedef typename CT::Type Type;
|
||||
CGAL_USE_TYPE(Type);
|
||||
CGAL_static_assertion((::boost::is_same<Type,RT>::value));
|
||||
r = typename CT::Cast()(x);
|
||||
}
|
||||
|
|
@ -695,14 +697,17 @@ void test_get_arithmetic_kernel(){
|
|||
{
|
||||
typedef CGAL::Sqrt_extension<Integer,Integer,ACDE_TAG> EXT;
|
||||
typedef typename CGAL::Get_arithmetic_kernel<EXT>::Arithmetic_kernel AT_;
|
||||
CGAL_USE_TYPE(AT_);
|
||||
CGAL_static_assertion((boost::is_same<AT,AT_>::value));
|
||||
} {
|
||||
typedef CGAL::Sqrt_extension<Rational,Integer,ACDE_TAG> EXT;
|
||||
typedef typename CGAL::Get_arithmetic_kernel<EXT>::Arithmetic_kernel AT_;
|
||||
CGAL_USE_TYPE(AT_);
|
||||
CGAL_static_assertion((boost::is_same<AT,AT_>::value));
|
||||
} {
|
||||
typedef CGAL::Sqrt_extension<Rational,Rational,ACDE_TAG> EXT;
|
||||
typedef typename CGAL::Get_arithmetic_kernel<EXT>::Arithmetic_kernel AT_;
|
||||
CGAL_USE_TYPE(AT_);
|
||||
CGAL_static_assertion((boost::is_same<AT,AT_>::value));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@
|
|||
|
||||
|
||||
#include <CGAL/basic.h>
|
||||
#include <CGAL/use.h>
|
||||
#include <cassert>
|
||||
#include <CGAL/Arithmetic_kernel.h>
|
||||
|
||||
|
|
@ -163,7 +164,7 @@ void AT_coercion_test_for_cgal_types_rat(){
|
|||
typedef typename AT::Rational Rational;
|
||||
typedef typename AT::Bigfloat_interval Bigfloat_interval;
|
||||
|
||||
|
||||
CGAL_USE_TYPE(Bigfloat_interval);
|
||||
CGAL_static_assertion(!(::boost::is_same<Integer, CGAL::Null_tag>::value));
|
||||
CGAL_static_assertion(!(::boost::is_same<Rational, CGAL::Null_tag>::value));
|
||||
CGAL_static_assertion(!(::boost::is_same<Bigfloat_interval, CGAL::Null_tag>::value));
|
||||
|
|
@ -224,6 +225,7 @@ void AT_coercion_test_for_cgal_types_fws(){
|
|||
typedef typename AT::Bigfloat_interval Bigfloat_interval;
|
||||
typedef typename AT::Field_with_sqrt Real;
|
||||
|
||||
CGAL_USE_TYPE(Bigfloat_interval);
|
||||
CGAL_static_assertion(!(::boost::is_same<Integer, CGAL::Null_tag>::value));
|
||||
CGAL_static_assertion(!(::boost::is_same<Rational, CGAL::Null_tag>::value));
|
||||
CGAL_static_assertion(!(::boost::is_same<Bigfloat_interval, CGAL::Null_tag>::value));
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@
|
|||
#include <list>
|
||||
#include <vector>
|
||||
#include <cassert>
|
||||
#include <CGAL/use.h>
|
||||
#include <CGAL/utility.h>
|
||||
#include <CGAL/iterator.h>
|
||||
#include <CGAL/algorithm.h>
|
||||
|
|
@ -8113,7 +8114,8 @@ void test_tuple(){
|
|||
typedef CGAL::cpp11::tuple<int,int> T1;
|
||||
typedef CGAL::cpp11::tuple<int,My_to_int,int,int> T2;
|
||||
|
||||
|
||||
CGAL_USE_TYPE(T0);
|
||||
CGAL_USE_TYPE(T2);
|
||||
CGAL_static_assertion( CGAL::cpp11::tuple_size<T0>::value == 0 );
|
||||
CGAL_static_assertion( CGAL::cpp11::tuple_size<T1>::value == 2 );
|
||||
CGAL_static_assertion( CGAL::cpp11::tuple_size<T2>::value == 4 );
|
||||
|
|
|
|||
Loading…
Reference in New Issue