|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r48710 - sandbox/committee/concepts/stdlib
From: dgregor_at_[hidden]
Date: 2008-09-10 17:42:37
Author: dgregor
Date: 2008-09-10 17:42:37 EDT (Wed, 10 Sep 2008)
New Revision: 48710
URL: http://svn.boost.org/trac/boost/changeset/48710
Log:
Fix relationship among reference types in te container concepts
Text files modified:
sandbox/committee/concepts/stdlib/clib-containers.tex | 15 ++++++++++++---
1 files changed, 12 insertions(+), 3 deletions(-)
Modified: sandbox/committee/concepts/stdlib/clib-containers.tex
==============================================================================
--- sandbox/committee/concepts/stdlib/clib-containers.tex (original)
+++ sandbox/committee/concepts/stdlib/clib-containers.tex 2008-09-10 17:42:37 EDT (Wed, 10 Sep 2008)
@@ -91,7 +91,12 @@
value inserted is the value now stored at the place of
insertion. Also, added *\tcode{Insertion} axioms to the emplace
concepts (all thanks to Alisdair Meredith).
-\item Convertibility requirement from \tcode{iterator} to \tcode{const_iterator} in the container concepts. Resolves concepts issue \#48.
+\item Convertibility requirement from \tcode{iterator} to
+ \tcode{const_iterator} in the container concepts. Resolves concepts
+ issue \#48. Also, added same-type requirements tying the
+ \tcode{reference} types of a container's iterators to the
+ \tcode{reference} and \tcode{const_reference} types of the
+ container.
\end{itemize}
\end{titlepage}
@@ -952,7 +957,9 @@
requires Convertible<iterator, const_iterator>
&& SameType<ForwardIterator<iterator>::value_type, value_type>
- && SameType<ForwardIterator<const_iterator>::value_type, value_type>;
+ && SameType<ForwardIterator<const_iterator>::value_type, value_type>
+ && SameType<ForwardIterator<iterator>::reference, reference>
+ && SameType<ForwardIterator<const_iterator>::reference, const_reference>;
bool empty(const C& c) { return begin(c) == end(c); }
size_type size(const C& c) { return std::distance(begin(c), end(c)); }
@@ -1129,7 +1136,9 @@
ForwardIterator const_iterator;
requires Convertible<iterator, const_iterator>
&& SameType<ForwardIterator<iterator>::value_type, value_type>
- && SameType<ForwardIterator<const_iterator>::value_type, value_type>;
+ && SameType<ForwardIterator<const_iterator>::value_type, value_type>
+ && SameType<ForwardIterator<iterator>::reference, reference>
+ && SameType<ForwardIterator<const_iterator>::reference, const_reference>;
bool C::empty() const { return this->begin() == this->end(); }
size_type C::size() const { return std::distance(this->begin(), this->end()); }
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk