diff options
author | redi <redi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-05-17 21:56:18 +0000 |
---|---|---|
committer | redi <redi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-05-17 21:56:18 +0000 |
commit | c0516d215a78665af50915cba1ca7758f57b1a37 (patch) | |
tree | 82262538f68a821f706e6e1ac967de7b4522c164 /libstdc++-v3 | |
parent | 075417bf43705f61484e293d75df74372ea3e182 (diff) | |
download | gcc-c0516d215a78665af50915cba1ca7758f57b1a37.tar.gz |
2004-05-17 Jonathan Wakely <redi@gcc.gnu.org>
* include/bits/boost_concept_check.h: Fix old attribute syntax.
* testsuite/23_containers/map/modifiers/swap.cc: Define operator<
to pass concept-checks.
* testsuite/23_containers/multimap/modifiers/swap.cc: Same.
* testsuite/23_containers/set/modifiers/swap.cc: Same.
* testsuite/23_containers/multiset/modifiers/swap.cc: Same.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@81953 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3')
6 files changed, 31 insertions, 10 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 89c2ad53ed5..39d1acdb1da 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,12 @@ +2004-05-17 Jonathan Wakely <redi@gcc.gnu.org> + + * include/bits/boost_concept_check.h: Fix old attribute syntax. + * testsuite/23_containers/map/modifiers/swap.cc: Define operator< + to pass concept-checks. + * testsuite/23_containers/multimap/modifiers/swap.cc: Same. + * testsuite/23_containers/set/modifiers/swap.cc: Same. + * testsuite/23_containers/multiset/modifiers/swap.cc: Same. + 2004-05-16 Paolo Carlini <pcarlini@suse.de> * include/std/std_bitset.h: Minor formatting fixes. diff --git a/libstdc++-v3/include/bits/boost_concept_check.h b/libstdc++-v3/include/bits/boost_concept_check.h index 7f255a72eeb..cf084fb3ccf 100644 --- a/libstdc++-v3/include/bits/boost_concept_check.h +++ b/libstdc++-v3/include/bits/boost_concept_check.h @@ -194,7 +194,7 @@ struct _Aux_require_same<_Tp,_Tp> { typedef _Tp _Type; }; __const_constraints(__a); } void __const_constraints(const _Tp& __a) { - _Tp __c(__a) _IsUnused; // require const copy constructor + _Tp __c _IsUnused(__a); // require const copy constructor const _Tp* __ptr _IsUnused = &__a; // require const address of operator } _Tp __b; @@ -205,12 +205,12 @@ struct _Aux_require_same<_Tp,_Tp> { typedef _Tp _Type; }; struct _SGIAssignableConcept { void __constraints() { - _Tp __b(__a) _IsUnused; + _Tp __b _IsUnused(__a); __a = __a; // require assignment operator __const_constraints(__a); } void __const_constraints(const _Tp& __b) { - _Tp __c(__b) _IsUnused; + _Tp __c _IsUnused(__b); __a = __b; // const required for argument to assignment } _Tp __a; @@ -726,9 +726,9 @@ struct _Aux_require_same<_Tp,_Tp> { typedef _Tp _Type; }; __function_requires< _DefaultConstructibleConcept<_Sequence> >(); _Sequence - __c(__n) _IsUnused, - __c2(__n, __t) _IsUnused, - __c3(__first, __last) _IsUnused; + __c _IsUnused(__n), + __c2 _IsUnused(__n, __t), + __c3 _IsUnused(__first, __last); __c.insert(__p, __t); __c.insert(__p, __n, __t); @@ -845,7 +845,7 @@ struct _Aux_require_same<_Tp,_Tp> { typedef _Tp _Type; }; __c.insert(__first, __last); } - typename _MultipleAssociativeContainer::iterator __pos _IsUnused; + typename _MultipleAssociativeContainer::iterator __pos; typename _MultipleAssociativeContainer::value_type __t; typename _MultipleAssociativeContainer::value_type *__first, *__last; }; @@ -888,9 +888,9 @@ struct _Aux_require_same<_Tp,_Tp> { typedef _Tp _Type; }; _ReversibleContainerConcept<_SortedAssociativeContainer> >(); _SortedAssociativeContainer - __c(__kc) _IsUnused, - __c2(__first, __last) _IsUnused, - __c3(__first, __last, __kc) _IsUnused; + __c _IsUnused(__kc), + __c2 _IsUnused(__first, __last), + __c3 _IsUnused(__first, __last, __kc); __p = __c.upper_bound(__k); __p = __c.lower_bound(__k); diff --git a/libstdc++-v3/testsuite/23_containers/map/modifiers/swap.cc b/libstdc++-v3/testsuite/23_containers/map/modifiers/swap.cc index 1afde71dd8a..b283b1c358b 100644 --- a/libstdc++-v3/testsuite/23_containers/map/modifiers/swap.cc +++ b/libstdc++-v3/testsuite/23_containers/map/modifiers/swap.cc @@ -21,6 +21,9 @@ struct T { int i; }; +// T must be LessThanComparable to pass concept-checks +bool operator<(T l, T r) { return l.i < r.i; } + int swap_calls; namespace std diff --git a/libstdc++-v3/testsuite/23_containers/multimap/modifiers/swap.cc b/libstdc++-v3/testsuite/23_containers/multimap/modifiers/swap.cc index 2e87dff1632..cc50a53990d 100644 --- a/libstdc++-v3/testsuite/23_containers/multimap/modifiers/swap.cc +++ b/libstdc++-v3/testsuite/23_containers/multimap/modifiers/swap.cc @@ -21,6 +21,9 @@ struct T { int i; }; +// T must be LessThanComparable to pass concept-checks +bool operator<(T l, T r) { return l.i < r.i; } + int swap_calls; namespace std diff --git a/libstdc++-v3/testsuite/23_containers/multiset/modifiers/swap.cc b/libstdc++-v3/testsuite/23_containers/multiset/modifiers/swap.cc index b9632cb88ae..4b422649a6a 100644 --- a/libstdc++-v3/testsuite/23_containers/multiset/modifiers/swap.cc +++ b/libstdc++-v3/testsuite/23_containers/multiset/modifiers/swap.cc @@ -21,6 +21,9 @@ struct T { int i; }; +// T must be LessThanComparable to pass concept-checks +bool operator<(T l, T r) { return l.i < r.i; } + int swap_calls; namespace std diff --git a/libstdc++-v3/testsuite/23_containers/set/modifiers/swap.cc b/libstdc++-v3/testsuite/23_containers/set/modifiers/swap.cc index dcc69c99b3a..43525ff5a85 100644 --- a/libstdc++-v3/testsuite/23_containers/set/modifiers/swap.cc +++ b/libstdc++-v3/testsuite/23_containers/set/modifiers/swap.cc @@ -21,6 +21,9 @@ struct T { int i; }; +// T must be LessThanComparable to pass concept-checks +bool operator<(T l, T r) { return l.i < r.i; } + int swap_calls; namespace std |