workaround ambiguous call in kernel intersection functions when including BSO_2

This commit is contained in:
Sébastien Loriot 2014-12-11 08:32:28 +01:00
parent fc407cfebf
commit 5b9be0f8c7
2 changed files with 9 additions and 2 deletions

View File

@ -32,6 +32,8 @@
#include <CGAL/Gps_traits_2.h>
#include <CGAL/iterator.h>
#include <CGAL/Boolean_set_operations_2/Bso_internal_functions.h>
#include <CGAL/is_iterator.h>
#include <boost/utility/enable_if.hpp>
namespace CGAL {
@ -902,7 +904,11 @@ inline OutputIterator intersection (InputIterator begin, InputIterator end,
template <typename InputIterator, typename OutputIterator>
inline OutputIterator intersection (InputIterator begin, InputIterator end,
OutputIterator oi, unsigned int k=5)
OutputIterator oi, unsigned int k=5,
typename boost::enable_if<
typename CGAL::is_iterator<InputIterator>
>::type* =0 // workaround to avoid ambiguous calls with kernel functions
)
{
typename map_iterator_to_traits<InputIterator>::Traits tr;
return intersection(begin, end, oi, tr, k);

View File

@ -7,7 +7,8 @@
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
// test that there is no conflict with overloads defined in BSO_2 package
#include <CGAL/Boolean_set_operations_2.h>
typedef CGAL::Exact_predicates_exact_constructions_kernel K1;
typedef CGAL::Exact_predicates_inexact_constructions_kernel K2;