From 79bb53827afa99aa176823b2d58830ab97af7511 Mon Sep 17 00:00:00 2001 From: Christopher Di Bella Date: Fri, 10 Mar 2017 14:15:08 +1100 Subject: [PATCH] PR for #299 --- iterators.tex | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/iterators.tex b/iterators.tex index a00c368e..eef32b80 100644 --- a/iterators.tex +++ b/iterators.tex @@ -860,7 +860,10 @@ template requires requires { typename T::element_type; } struct value_type - : enable_if::value, typename T::element_type> { }; + : enable_if< + is_object::value, + remove_cv_t> + { }; template using value_type_t = typename value_type::type; @@ -884,7 +887,8 @@ \pnum When instantiated with a type \tcode{I} such that \tcode{I::element_type} is valid and denotes a type, -\tcode{value_type::type} names that type, unless it is not an object type~(\cxxref{basic.types}) in which case +\tcode{value_type::type} names the type \tcode{remove_cv_t}, unless it is +not an object type~(\cxxref{basic.types}) in which case \tcode{value_type} shall have no nested type \tcode{type}. \enternote Smart pointers like \tcode{shared_ptr} are \tcode{Readable} and have an associated value type. But a smart pointer like \tcode{shared_ptr} is not \tcode{Readable} and has no associated value type.\exitnote