Kill warning, convert Flat_orientation (may need something nicer later), test in_flat_orientation.

This commit is contained in:
Marc Glisse 2012-08-22 14:31:11 +00:00
parent 8856fbb938
commit b185997a71
3 changed files with 15 additions and 5 deletions

View File

@ -138,6 +138,7 @@ typename typeset_intersection<typename K1::Object_list, typename K2::Object_list
Null_vector operator()(Null_vector const&v)const{return v;}
FT2 operator()(FT1 const&x)const{return c(x);}
//RT2 operator()(typename First_if_different<RT1,FT1>::Type const&x)const{return cr(x);}
typename K2::Flat_orientation const& operator()(typename K1::Flat_orientation const&o)const{return o;} // Both kernels should have the same, returning a reference should warn if not.
template<class It>
transforming_iterator<Final_,typename boost::enable_if<is_iterator<It>,It>::type>

View File

@ -45,17 +45,21 @@ namespace CGAL {
template<class X> struct contains :
boost::mpl::if_<boost::is_same<H,X>,boost::true_type,typename tail::template contains<X> >::type
{};
template<class X,class=void> struct add :
template<class X,class=void> struct add;
//boost::mpl::if_<boost::is_same<H,X>,typeset,typeset<X,typeset> >::type
typeset<H,typename tail::template add<X>::type>
{};
template<class V> struct add<H,V> : typeset {};
};
template<> struct typeset<> {
typedef typeset type;
template<class X> struct contains : boost::false_type {};
template<class X> struct add : typeset<X> {};
};
template<class H,class T>
template<class X,class>
struct typeset<H,T>::add : typeset<H,typename T::template add<X>::type> {};
template<class H,class T>
template<class V>
struct typeset<H,T>::add<H,V> : typeset<H,T> {};
#endif
template<class T1, class T2> struct typeset_union_ :

View File

@ -183,10 +183,15 @@ void test3(){
P x[]={cp(2,2,3),cp(2,2,0),cp(1,2,1)};
FO fo2=cfo(&x[0],x+3);
std::cout << fo2;
P y[]={cp(0,2,4),cp(3,1,2),cp(3,3,6)};
P y[]={cp(0,2,4),cp(3,1,2),cp(3,3,6),cp(0,4,8)};
FO fo3=cfo(&y[0],y+3);
assert(fo3.rest.size()==1 && fo3.rest[0]!=3);
std::cout << fo3;
CGAL::Orientation base=ifo(fo3,&y[0],y+3);
assert(ifo(fo3,y+1,y+4)==base);
P yy[]={y[1],y[3],y[0],y[2]};
assert(ifo(fo3,yy+0,yy+3)==base);
assert(ifo(fo3,yy+1,yy+4)==base);
}
int main(){