diff --git a/Kernel_d/doc/Kernel_d/CGAL/Epick_d.h b/Kernel_d/doc/Kernel_d/CGAL/Epick_d.h index 4230517c605..fe78662f1e7 100644 --- a/Kernel_d/doc/Kernel_d/CGAL/Epick_d.h +++ b/Kernel_d/doc/Kernel_d/CGAL/Epick_d.h @@ -22,6 +22,9 @@ concept: it is missing the constructions `Lift_to_paraboloid_d` and `Project_along_d_axis_d` which do not make sense with a single fixed dimension. +Only the interfaces specific to this class are listed here, refer to the +concepts for the rest. + \cgalModels `Kernel_d` \cgalModels `DelaunayTriangulationTraits` diff --git a/NewKernel_d/include/CGAL/is_iterator.h b/NewKernel_d/include/CGAL/is_iterator.h deleted file mode 100644 index 591a26d86d6..00000000000 --- a/NewKernel_d/include/CGAL/is_iterator.h +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) 2011 INRIA Saclay Ile-de-France (France). -// All rights reserved. -// -// Licensees holding a valid commercial license may use this file in -// accordance with the commercial license agreement provided with the software. -// -// This file is part of CGAL (www.cgal.org); you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public License as -// published by the Free Software Foundation; version 2.1 of the License. -// See the file LICENSE.LGPL distributed with CGAL. -// -// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -// -// $URL$ -// $Id$ -// -// -// Author(s) : Marc Glisse - - -#ifndef CGAL_IS_ITERATOR_H -#define CGAL_IS_ITERATOR_H - -#include -#include -#include - -namespace CGAL { -namespace internal { -BOOST_MPL_HAS_XXX_TRAIT_DEF(iterator_category) -template struct is_iterator_ { - enum { value = has_iterator_category::value - || boost::is_pointer::value }; -}; -template ::value> -struct is_iterator_type_ { - enum { value=false }; -}; -template struct is_iterator_type_ : - //boost::is_base_of::iterator_category> - boost::is_convertible::iterator_category,U> - {}; - -} - -// NOTE: we don't want the real std::decay or functions are included -template struct is_iterator : - internal::is_iterator_::type>::type> {}; - -template struct is_iterator_type : - internal::is_iterator_type_::type>::type,Tg> {}; - -template ::value> struct is_iterator_to { - enum { value=false }; -}; -template struct is_iterator_to : - boost::is_convertible::value_type,U> -{ }; - - -} - -#endif // CGAL_IS_ITERATOR_H diff --git a/STL_Extension/include/CGAL/is_iterator.h b/STL_Extension/include/CGAL/is_iterator.h index 5043515a8e8..6b1e4884c91 100644 --- a/STL_Extension/include/CGAL/is_iterator.h +++ b/STL_Extension/include/CGAL/is_iterator.h @@ -67,6 +67,13 @@ template struct is_iterator : template struct is_iterator_type : internal::is_iterator_type_::type>::type,Tag> {}; +template ::value> struct is_iterator_to { + enum { value=false }; +}; +template struct is_iterator_to : + boost::is_convertible::value_type,U> +{ }; + } #endif // CGAL_IS_ITERATOR_H diff --git a/STL_Extension/test/STL_Extension/test_is_iterator.cpp b/STL_Extension/test/STL_Extension/test_is_iterator.cpp index 31aaf66957f..ffe3f0ad35d 100644 --- a/STL_Extension/test/STL_Extension/test_is_iterator.cpp +++ b/STL_Extension/test/STL_Extension/test_is_iterator.cpp @@ -2,14 +2,29 @@ #include #include #include +#include + +struct A { }; int main() { typedef std::vector::const_iterator vector_it; + typedef std::list::const_iterator list_it; typedef int* int_p; using CGAL::is_iterator; + using CGAL::is_iterator_type; + using CGAL::is_iterator_to; CGAL_static_assertion(is_iterator::value); + CGAL_static_assertion(is_iterator::value); CGAL_static_assertion(!is_iterator::value); CGAL_static_assertion(!is_iterator::value); CGAL_static_assertion(is_iterator::value); + + CGAL_static_assertion((is_iterator_type::value)); + CGAL_static_assertion((!is_iterator_type::value)); + CGAL_static_assertion((!is_iterator_type::value)); + + CGAL_static_assertion((is_iterator_to::value)); + CGAL_static_assertion((!is_iterator_to::value)); + CGAL_static_assertion((!is_iterator_to::value)); }