diff options
| author | Alexander Kabaev <kan@FreeBSD.org> | 2004-07-28 03:12:05 +0000 |
|---|---|---|
| committer | Alexander Kabaev <kan@FreeBSD.org> | 2004-07-28 03:12:05 +0000 |
| commit | ffeaf689a248da869b6bc8d4fd2233dfe513c060 (patch) | |
| tree | 75ef0e6da73746d6849e25a0996ae34e1aeff51d /contrib/libstdc++/include/ext/iterator | |
| parent | 9a63ad9273061dc19cbd117762e365ea9634e241 (diff) | |
Notes
Diffstat (limited to 'contrib/libstdc++/include/ext/iterator')
| -rw-r--r-- | contrib/libstdc++/include/ext/iterator | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/contrib/libstdc++/include/ext/iterator b/contrib/libstdc++/include/ext/iterator index f23212f241d6b..094313c76e47e 100644 --- a/contrib/libstdc++/include/ext/iterator +++ b/contrib/libstdc++/include/ext/iterator @@ -60,36 +60,37 @@ */ #ifndef _EXT_ITERATOR -#define _EXT_ITERATOR +#define _EXT_ITERATOR 1 #pragma GCC system_header + #include <bits/concept_check.h> #include <iterator> namespace __gnu_cxx { - - // There are two signatures for distance. In addition to the one taking - // two iterators and returning a result, there is another taking two - // iterators and a reference-to-result variable, and returning nothing. - // The latter seems to be an SGI extension. -- pedwards + // There are two signatures for distance. In addition to the one + // taking two iterators and returning a result, there is another + // taking two iterators and a reference-to-result variable, and + // returning nothing. The latter seems to be an SGI extension. + // -- pedwards template<typename _InputIterator, typename _Distance> inline void __distance(_InputIterator __first, _InputIterator __last, _Distance& __n, std::input_iterator_tag) { // concept requirements - __glibcpp_function_requires(_InputIteratorConcept<_InputIterator>) + __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>) while (__first != __last) { ++__first; ++__n; } } template<typename _RandomAccessIterator, typename _Distance> inline void - __distance(_RandomAccessIterator __first, _RandomAccessIterator __last, + __distance(_RandomAccessIterator __first, _RandomAccessIterator __last, _Distance& __n, std::random_access_iterator_tag) { // concept requirements - __glibcpp_function_requires(_RandomAccessIteratorConcept<_RandomAccessIterator>) + __glibcxx_function_requires(_RandomAccessIteratorConcept<_RandomAccessIterator>) __n += __last - __first; } @@ -106,8 +107,7 @@ namespace __gnu_cxx // concept requirements -- taken care of in __distance __distance(__first, __last, __n, std::__iterator_category(__first)); } - } // namespace __gnu_cxx -#endif /* _EXT_ITERATOR */ +#endif |
