This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
[Patch/RFC] libstdc++/16154 (aka: requirements of input iterators)
- From: Paolo Carlini <pcarlini at suse dot de>
- To: libstdc++ <libstdc++ at gcc dot gnu dot org>
- Date: Wed, 23 Jun 2004 13:13:28 +0200
- Subject: [Patch/RFC] libstdc++/16154 (aka: requirements of input iterators)
Hi,
this PR is about an over strict concept check. I think submitter is
right in believing that: "Neither in section 24.1.1 nor in section 25.2
of the C++ standard I see any requirement that input iterators have to
be default constructible"
Therefore, I propose the below minimal fix. Longer term, we may consider,
for many other reasons, upgrading to the latest Boost release.
Ok with everyone? I'll wait 'til this evening...
Paolo.
///////////
2004-06-23 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/16154
* include/bits/boost_concept_check.h (struct _TrivialIteratorConcept):
Don't require the _DefaultConstructibleConcept.
(struct _ForwardIteratorConcept): Require it here.
diff -urN libstdc++-v3-orig/include/bits/boost_concept_check.h libstdc++-v3/include/bits/boost_concept_check.h
--- libstdc++-v3-orig/include/bits/boost_concept_check.h 2004-05-17 23:56:16.000000000 +0200
+++ libstdc++-v3/include/bits/boost_concept_check.h 2004-06-23 12:34:53.000000000 +0200
@@ -418,7 +418,7 @@
struct _TrivialIteratorConcept
{
void __constraints() {
- __function_requires< _DefaultConstructibleConcept<_Tp> >();
+// __function_requires< _DefaultConstructibleConcept<_Tp> >();
__function_requires< _AssignableConcept<_Tp> >();
__function_requires< _EqualityComparableConcept<_Tp> >();
// typedef typename std::iterator_traits<_Tp>::value_type _V;
@@ -475,6 +475,7 @@
{
void __constraints() {
__function_requires< _InputIteratorConcept<_Tp> >();
+ __function_requires< _DefaultConstructibleConcept<_Tp> >();
__function_requires< _ConvertibleConcept<
typename std::iterator_traits<_Tp>::iterator_category,
std::forward_iterator_tag> >();