diff options
author | Paolo Carlini <pcarlini@suse.de> | 2007-11-15 19:05:17 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2007-11-15 19:05:17 +0000 |
commit | 4f39bf5c6baa0279e1c763b6a9e30fb0bb4ef2a7 (patch) | |
tree | 892e71e4a0cbd22ffa49a034f35871838d86a536 /libstdc++-v3/include/parallel | |
parent | cb8e078d3f0aa2a99eb9d14ba0f38354ffc181a6 (diff) | |
download | gcc-4f39bf5c6baa0279e1c763b6a9e30fb0bb4ef2a7.tar.gz |
re PR libstdc++/34105 (Confusing error message with missing #include <algorithm>)
2007-11-15 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/34105
* include/bits/stl_algobase.h: Do not include <bits/algorithmfwd.h>.
(lexicographical_compare(const unsigned char*, const unsigned char*,
const unsigned char*, const unsigned char*),
lexicographical_compare(const char*, const char*, const char*,
const char*)): Move to namespace (std, _GLIBCXX_STD_P).
* include/parallel/algobase.h: Do not include <bits/algorithmfwd.h>.
(equal): Move after mismatch.
* include/bits/stl_heap.h (is_heap, is_heap_until): Reorder.
* include/bits/char_traits.h: Include <bits/stl_algobase.h> instead
of <bits/algorithmfwd.h>.
* include/bits/stl_algo.h: Include first <bits/algorithmfwd.h>.
* include/bits/algorithmfwd.h (lexicographical_compare): Do not
declare overloads.
* include/parallel/partition.h: Include <parallel/random_number.h>.
* testsuite/util/testsuite_abi.cc: Include <algorithm>.
From-SVN: r130207
Diffstat (limited to 'libstdc++-v3/include/parallel')
-rw-r--r-- | libstdc++-v3/include/parallel/algobase.h | 59 | ||||
-rw-r--r-- | libstdc++-v3/include/parallel/partition.h | 1 |
2 files changed, 29 insertions, 31 deletions
diff --git a/libstdc++-v3/include/parallel/algobase.h b/libstdc++-v3/include/parallel/algobase.h index a345b0f695a..8e9438d8a8d 100644 --- a/libstdc++-v3/include/parallel/algobase.h +++ b/libstdc++-v3/include/parallel/algobase.h @@ -42,48 +42,18 @@ #ifndef _GLIBCXX_PARALLEL_ALGOBASE_H #define _GLIBCXX_PARALLEL_ALGOBASE_H 1 -#include <parallel/algorithmfwd.h> #include <bits/stl_algobase.h> #include <parallel/base.h> #include <parallel/tags.h> #include <parallel/settings.h> #include <parallel/find.h> #include <parallel/find_selectors.h> -#include <parallel/for_each.h> -#include <parallel/for_each_selectors.h> namespace std { namespace __parallel { - // Sequential fallback - template<typename InputIterator1, typename InputIterator2> - inline bool - equal(InputIterator1 begin1, InputIterator1 end1, InputIterator2 begin2, - __gnu_parallel::sequential_tag) - { return _GLIBCXX_STD_P::equal(begin1, end1, begin2); } - - // Sequential fallback - template<typename InputIterator1, typename InputIterator2, typename Predicate> - inline bool - equal(InputIterator1 begin1, InputIterator1 end1, InputIterator2 begin2, - Predicate pred, __gnu_parallel::sequential_tag) - { return _GLIBCXX_STD_P::equal(begin1, end1, begin2, pred); } - - // Public interface - template<typename InputIterator1, typename InputIterator2> - inline bool - equal(InputIterator1 begin1, InputIterator1 end1, InputIterator2 begin2) - { return mismatch(begin1, end1, begin2).first == end1; } - - // Public interface - template<typename InputIterator1, typename InputIterator2, typename Predicate> - inline bool - equal(InputIterator1 begin1, InputIterator1 end1, InputIterator2 begin2, - Predicate pred) - { return mismatch(begin1, end1, begin2, pred).first == end1; } - - // NB: lexicographical_compare equires mismatch. + // NB: equal and lexicographical_compare require mismatch. // Sequential fallback template<typename InputIterator1, typename InputIterator2> @@ -159,6 +129,33 @@ namespace __parallel // Sequential fallback template<typename InputIterator1, typename InputIterator2> inline bool + equal(InputIterator1 begin1, InputIterator1 end1, InputIterator2 begin2, + __gnu_parallel::sequential_tag) + { return _GLIBCXX_STD_P::equal(begin1, end1, begin2); } + + // Sequential fallback + template<typename InputIterator1, typename InputIterator2, typename Predicate> + inline bool + equal(InputIterator1 begin1, InputIterator1 end1, InputIterator2 begin2, + Predicate pred, __gnu_parallel::sequential_tag) + { return _GLIBCXX_STD_P::equal(begin1, end1, begin2, pred); } + + // Public interface + template<typename InputIterator1, typename InputIterator2> + inline bool + equal(InputIterator1 begin1, InputIterator1 end1, InputIterator2 begin2) + { return mismatch(begin1, end1, begin2).first == end1; } + + // Public interface + template<typename InputIterator1, typename InputIterator2, typename Predicate> + inline bool + equal(InputIterator1 begin1, InputIterator1 end1, InputIterator2 begin2, + Predicate pred) + { return mismatch(begin1, end1, begin2, pred).first == end1; } + + // Sequential fallback + template<typename InputIterator1, typename InputIterator2> + inline bool lexicographical_compare(InputIterator1 begin1, InputIterator1 end1, InputIterator2 begin2, InputIterator2 end2, __gnu_parallel::sequential_tag) diff --git a/libstdc++-v3/include/parallel/partition.h b/libstdc++-v3/include/parallel/partition.h index d21a615960e..2b8631db73e 100644 --- a/libstdc++-v3/include/parallel/partition.h +++ b/libstdc++-v3/include/parallel/partition.h @@ -41,6 +41,7 @@ #include <parallel/basic_iterator.h> #include <parallel/sort.h> +#include <parallel/random_number.h> #include <bits/stl_algo.h> #include <parallel/parallel.h> |