diff --git a/Interval_support/include/CGAL/Interval_traits.h b/Interval_support/include/CGAL/Interval_traits.h index 654ed8b51a3..6d434bc477d 100644 --- a/Interval_support/include/CGAL/Interval_traits.h +++ b/Interval_support/include/CGAL/Interval_traits.h @@ -52,6 +52,8 @@ #define CGAL_INTERVAL_TRAITS_H #include +#include +#include namespace CGAL { @@ -192,16 +194,27 @@ proper_subset(Interval interval1, Interval interval2) { // Set operations, functions returing Interval +//the enable_if is need for MSVC as it is not able to eliminate +//the function if Interval_traits::Intersection has no result_type +//(like Null_functor) template inline typename Interval_traits::Intersection::result_type -intersection(Interval interval1, Interval interval2) { +intersection(Interval interval1, Interval interval2, typename boost::enable_if< + boost::is_same< + typename Interval_traits::Is_interval, + Tag_true > >::type* = NULL +) { typename Interval_traits::Intersection intersection; return intersection(interval1, interval2); } template inline typename Interval_traits::Hull::result_type -hull(Interval interval1, Interval interval2) { +hull(Interval interval1, Interval interval2, typename boost::enable_if< + boost::is_same< + typename Interval_traits::Is_interval, + Tag_true > >::type* = NULL) +{ typename Interval_traits::Hull hull; return hull(interval1, interval2); } diff --git a/STL_Extension/include/CGAL/tags.h b/STL_Extension/include/CGAL/tags.h index 423fd26ae4b..79ac1f43a88 100644 --- a/STL_Extension/include/CGAL/tags.h +++ b/STL_Extension/include/CGAL/tags.h @@ -50,10 +50,13 @@ inline bool check_tag( Tag_false) {return false;} struct Null_tag {}; struct Null_functor { - #if defined(BOOST_MSVC) //temporary fix for VC - typedef Null_tag result_type; - typedef Null_tag second_argument_type; - #endif +//SL: I commented the following because I fixed +//in Interval_traits.h the global functions intersection and hull +//to check that the type is really an interval +// #if defined(BOOST_MSVC) //temporary fix for VC +// typedef Null_tag result_type; +// typedef Null_tag second_argument_type; +// #endif };