From f28c0b042a7ff2fbfa4f54732f8d06df17fe25fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Mon, 13 May 2013 10:03:20 +0200 Subject: [PATCH] update doc of value_type_traits --- .../include/CGAL/value_type_traits.h | 41 +++++++++---------- 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/Point_set_processing_3/include/CGAL/value_type_traits.h b/Point_set_processing_3/include/CGAL/value_type_traits.h index 872fae9ab2c..63f94945988 100644 --- a/Point_set_processing_3/include/CGAL/value_type_traits.h +++ b/Point_set_processing_3/include/CGAL/value_type_traits.h @@ -24,41 +24,40 @@ namespace CGAL { -/// Traits class to get the value type of any iterator, -/// including an output iterator. +/// \ingroup PkgPointSetProcessing +/// Class providing the value type of an iterator, and +/// in the case of an output iterator, a type of objects that can be put in it. /// -/// Usage is: -/// \code -/// typedef typename value_type_traits::type value_type; -/// \endcode -/// -/// There are specializations for the following iterators to use value_type of a container: -/// - insert_iterator -/// - back_insert_iterator -/// - front_insert_iterator -/// template struct value_type_traits { + #ifndef DOXYGEN_RUNNING typedef typename std::iterator_traits::value_type type; + #else + /// If `T` is `std::insert_iterator`, `std::back_insert_iterator` or + /// `std::front_insert_iterator`, then `type` is `Container::value_type`. + /// Otherwise, `type` is `std::iterator_traits::%value_type`. + + typedef Hidden_type type; + #endif }; -template -struct value_type_traits > +template +struct value_type_traits > { - typedef typename T::value_type type; + typedef typename Container::value_type type; }; -template -struct value_type_traits > +template +struct value_type_traits > { - typedef typename T::value_type type; + typedef typename Container::value_type type; }; -template -struct value_type_traits > +template +struct value_type_traits > { - typedef typename T::value_type type; + typedef typename Container::value_type type; }; } //namespace CGAL