From 4b7ed13a8fb6fb44856a01873a5f188f5f48e95e Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Sun, 14 Oct 2007 21:17:23 +0000 Subject: [PATCH] stl_algo.h (is_sorted, [...]): Add. 2007-10-14 Paolo Carlini * include/bits/stl_algo.h (is_sorted, is_sorted_until): Add. * include/bits/algorithmfwd.h: Add. * include/ext/algorithm: Adjust. * testsuite/25_algorithms/is_sorted/requirements/ explicit_instantiation/2.cc: New. * testsuite/25_algorithms/is_sorted/requirements/ explicit_instantiation/pod.cc: Likewise. * testsuite/25_algorithms/is_sorted/1.cc: Likewise. * testsuite/25_algorithms/is_sorted_until/requirements/ explicit_instantiation/2.cc: Likewise. * testsuite/25_algorithms/is_sorted_until/requirements/ explicit_instantiation/pod.cc: Likewise. * testsuite/25_algorithms/is_sorted_until/1.cc: Likewise. * testsuite/25_algorithms/headers/algorithm/synopsis.cc: Add is_sorted and is_sorted_until. * include/bits/stl_heap.h (is_heap_until): Add concept and debug-mode checks. From-SVN: r129303 --- libstdc++-v3/ChangeLog | 21 +++++ libstdc++-v3/include/bits/algorithmfwd.h | 16 ++++ libstdc++-v3/include/bits/stl_algo.h | 92 ++++++++++++++++++- libstdc++-v3/include/bits/stl_heap.h | 20 +++- libstdc++-v3/include/ext/algorithm | 5 + .../headers/algorithm/synopsis.cc | 16 ++++ .../testsuite/25_algorithms/is_sorted/1.cc | 52 +++++++++++ .../requirements/explicit_instantiation/2.cc | 47 ++++++++++ .../explicit_instantiation/pod.cc | 46 ++++++++++ .../25_algorithms/is_sorted_until/1.cc | 52 +++++++++++ .../requirements/explicit_instantiation/2.cc | 48 ++++++++++ .../explicit_instantiation/pod.cc | 47 ++++++++++ 12 files changed, 456 insertions(+), 6 deletions(-) create mode 100644 libstdc++-v3/testsuite/25_algorithms/is_sorted/1.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/is_sorted/requirements/explicit_instantiation/2.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/is_sorted/requirements/explicit_instantiation/pod.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/is_sorted_until/1.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/is_sorted_until/requirements/explicit_instantiation/2.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/is_sorted_until/requirements/explicit_instantiation/pod.cc diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 7b4721b9f9d..3e41f634904 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,24 @@ +2007-10-14 Paolo Carlini + + * include/bits/stl_algo.h (is_sorted, is_sorted_until): Add. + * include/bits/algorithmfwd.h: Add. + * include/ext/algorithm: Adjust. + * testsuite/25_algorithms/is_sorted/requirements/ + explicit_instantiation/2.cc: New. + * testsuite/25_algorithms/is_sorted/requirements/ + explicit_instantiation/pod.cc: Likewise. + * testsuite/25_algorithms/is_sorted/1.cc: Likewise. + * testsuite/25_algorithms/is_sorted_until/requirements/ + explicit_instantiation/2.cc: Likewise. + * testsuite/25_algorithms/is_sorted_until/requirements/ + explicit_instantiation/pod.cc: Likewise. + * testsuite/25_algorithms/is_sorted_until/1.cc: Likewise. + * testsuite/25_algorithms/headers/algorithm/synopsis.cc: + Add is_sorted and is_sorted_until. + + * include/bits/stl_heap.h (is_heap_until): Add concept and + debug-mode checks. + 2007-10-12 Paolo Carlini * include/bits/stl_heap.h (__is_heap_until): Add. diff --git a/libstdc++-v3/include/bits/algorithmfwd.h b/libstdc++-v3/include/bits/algorithmfwd.h index b831e30931b..9155f83cfbb 100644 --- a/libstdc++-v3/include/bits/algorithmfwd.h +++ b/libstdc++-v3/include/bits/algorithmfwd.h @@ -197,6 +197,22 @@ _GLIBCXX_BEGIN_NAMESPACE(std) template _RAIter is_heap_until(_RAIter, _RAIter, _Compare); + + template + bool + is_sorted(_FIter, _FIter); + + template + bool + is_sorted(_FIter, _FIter, _Compare); + + template + _FIter + is_sorted_until(_FIter, _FIter); + + template + _FIter + is_sorted_until(_FIter, _FIter, _Compare); #endif template diff --git a/libstdc++-v3/include/bits/stl_algo.h b/libstdc++-v3/include/bits/stl_algo.h index 1b1d214964b..dd6d7f338c4 100644 --- a/libstdc++-v3/include/bits/stl_algo.h +++ b/libstdc++-v3/include/bits/stl_algo.h @@ -3409,10 +3409,10 @@ _GLIBCXX_BEGIN_NAMESPACE(std) /** * @brief Permute range into the next "dictionary" ordering using - * comparison functor. + * comparison functor. * @param first Start of range. * @param last End of range. - * @param comp + * @param comp A comparison functor. * @return False if wrapped to first permutation, true otherwise. * * Treats all permutations of the range [first,last) as a set of @@ -3520,10 +3520,10 @@ _GLIBCXX_BEGIN_NAMESPACE(std) /** * @brief Permute range into the previous "dictionary" ordering using - * comparison functor. + * comparison functor. * @param first Start of range. * @param last End of range. - * @param comp + * @param comp A comparison functor. * @return False if wrapped to last permutation, true otherwise. * * Treats all permutations of the range [first,last) as a set of @@ -3651,6 +3651,90 @@ _GLIBCXX_BEGIN_NAMESPACE(std) return __result; } +#ifdef __GXX_EXPERIMENTAL_CXX0X__ + /** + * @brief Determines whether the elements of a sequence are sorted. + * @param first An iterator. + * @param last Another iterator. + * @return True if the elements are sorted, false otherwise. + */ + template + inline bool + is_sorted(_ForwardIterator __first, _ForwardIterator __last) + { return std::is_sorted_until(__first, __last) == __last; } + + /** + * @brief Determines whether the elements of a sequence are sorted + * according to a comparison functor. + * @param first An iterator. + * @param last Another iterator. + * @param comp A comparison functor. + * @return True if the elements are sorted, false otherwise. + */ + template + inline bool + is_sorted(_ForwardIterator __first, _ForwardIterator __last, + _Compare __comp) + { return std::is_sorted_until(__first, __last, __comp) == __last; } + + /** + * @brief Determines the end of a sorted sequence. + * @param first An iterator. + * @param last Another iterator. + * @return An iterator pointing to the last iterator i in [first, last) + * for which the range [first, i) is sorted. + */ + template + _ForwardIterator + is_sorted_until(_ForwardIterator __first, _ForwardIterator __last) + { + // concept requirements + __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>) + __glibcxx_function_requires(_LessThanComparableConcept< + typename iterator_traits<_ForwardIterator>::value_type>) + __glibcxx_requires_valid_range(__first, __last); + + if (__first == __last) + return __last; + + _ForwardIterator __next = __first; + for (++__next; __next != __last; __first = __next, ++__next) + if (*__next < *__first) + return __next; + return __next; + } + + /** + * @brief Determines the end of a sorted sequence using comparison functor. + * @param first An iterator. + * @param last Another iterator. + * @param comp A comparison functor. + * @return An iterator pointing to the last iterator i in [first, last) + * for which the range [first, i) is sorted. + */ + template + _ForwardIterator + is_sorted_until(_ForwardIterator __first, _ForwardIterator __last, + _Compare __comp) + { + // concept requirements + __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>) + __glibcxx_function_requires(_BinaryPredicateConcept<_Compare, + typename iterator_traits<_ForwardIterator>::value_type, + typename iterator_traits<_ForwardIterator>::value_type>) + __glibcxx_requires_valid_range(__first, __last); + + if (__first == __last) + return __last; + + _ForwardIterator __next = __first; + for (++__next; __next != __last; __first = __next, ++__next) + if (__comp(*__next, *__first)) + return __next; + return __next; + } +#endif // __GXX_EXPERIMENTAL_CXX0X__ + _GLIBCXX_END_NAMESPACE _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_P) diff --git a/libstdc++-v3/include/bits/stl_heap.h b/libstdc++-v3/include/bits/stl_heap.h index 06d90937e96..e800f65c289 100644 --- a/libstdc++-v3/include/bits/stl_heap.h +++ b/libstdc++-v3/include/bits/stl_heap.h @@ -488,9 +488,10 @@ _GLIBCXX_BEGIN_NAMESPACE(std) #ifdef __GXX_EXPERIMENTAL_CXX0X__ /** - * @brief Check whether a range is a heap. + * @brief Determines whether a range is a heap. * @param first Start of range. * @param last End of range. + * @return True if range is a heap, false otherwise. * @ingroup heap */ template @@ -499,10 +500,11 @@ _GLIBCXX_BEGIN_NAMESPACE(std) { return std::is_heap_until(__first, __last) == __last; } /** - * @brief Check whether a range is a heap using comparison functor. + * @brief Determines whether a range is a heap using comparison functor. * @param first Start of range. * @param last End of range. * @param comp Comparison functor to use. + * @return True if range is a heap, false otherwise. * @ingroup heap */ template @@ -515,6 +517,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) * @brief Search the end of a heap. * @param first Start of range. * @param last End of range. + * @return An iterator pointing to the first element not in the heap. * @ingroup heap * * This operation returns the last iterator i in [first, last) for which @@ -524,6 +527,13 @@ _GLIBCXX_BEGIN_NAMESPACE(std) inline _RandomAccessIterator is_heap_until(_RandomAccessIterator __first, _RandomAccessIterator __last) { + // concept requirements + __glibcxx_function_requires(_RandomAccessIteratorConcept< + _RandomAccessIterator>) + __glibcxx_function_requires(_LessThanComparableConcept< + typename iterator_traits<_RandomAccessIterator>::value_type>) + __glibcxx_requires_valid_range(__first, __last); + return __first + std::__is_heap_until(__first, std::distance(__first, __last)); } @@ -533,6 +543,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) * @param first Start of range. * @param last End of range. * @param comp Comparison functor to use. + * @return An iterator pointing to the first element not in the heap. * @ingroup heap * * This operation returns the last iterator i in [first, last) for which @@ -543,6 +554,11 @@ _GLIBCXX_BEGIN_NAMESPACE(std) is_heap_until(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) { + // concept requirements + __glibcxx_function_requires(_RandomAccessIteratorConcept< + _RandomAccessIterator>) + __glibcxx_requires_valid_range(__first, __last); + return __first + std::__is_heap_until(__first, std::distance(__first, __last), __comp); diff --git a/libstdc++-v3/include/ext/algorithm b/libstdc++-v3/include/ext/algorithm index 10ca58aa2fd..5a24b7e6f48 100644 --- a/libstdc++-v3/include/ext/algorithm +++ b/libstdc++-v3/include/ext/algorithm @@ -428,6 +428,10 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) __out_last - __out_first); } +#ifdef __GXX_EXPERIMENTAL_CXX0X__ + using std::is_heap; + using std::is_sorted; +#else /** * This is an SGI extension. * @ingroup SGIextensions @@ -523,6 +527,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) return false; return true; } +#endif _GLIBCXX_END_NAMESPACE diff --git a/libstdc++-v3/testsuite/25_algorithms/headers/algorithm/synopsis.cc b/libstdc++-v3/testsuite/25_algorithms/headers/algorithm/synopsis.cc index 3176a53d4e6..7a02610a320 100644 --- a/libstdc++-v3/testsuite/25_algorithms/headers/algorithm/synopsis.cc +++ b/libstdc++-v3/testsuite/25_algorithms/headers/algorithm/synopsis.cc @@ -417,6 +417,22 @@ namespace std template _RAIter is_heap_until(_RAIter, _RAIter, _Compare); + + template + bool + is_sorted(_FIter, _FIter); + + template + bool + is_sorted(_FIter, _FIter, _Compare); + + template + _FIter + is_sorted_until(_FIter, _FIter); + + template + _FIter + is_sorted_until(_FIter, _FIter, _Compare); #endif // 25.3.7, minimum and maximum: diff --git a/libstdc++-v3/testsuite/25_algorithms/is_sorted/1.cc b/libstdc++-v3/testsuite/25_algorithms/is_sorted/1.cc new file mode 100644 index 00000000000..840597ba318 --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/is_sorted/1.cc @@ -0,0 +1,52 @@ +// { dg-options "-std=gnu++0x" } + +// 2007-10-14 Paolo Carlini +// +// Copyright (C) 2007 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without Pred the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +// USA. + +// 25.3.6 Heap operations [lib.alg.heap.operations] + +#include +#include +#include + +int A[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}; +int B[] = {9, 8, 7, 6, 5, 4, 3, 2, 1, 0}; +const int N = sizeof(A) / sizeof(int); + +void +test01() +{ + bool test __attribute__((unused)) = true; + + for (int i = 0; i <= N; ++i) + { + VERIFY( std::is_sorted(A, A + i) ); + VERIFY( std::is_sorted(A, A + i, std::less()) ); + VERIFY( std::is_sorted(B, B + i, std::greater()) ); + VERIFY( (i < 2) || !std::is_sorted(B, B + i) ); + } +} + +int +main() +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/25_algorithms/is_sorted/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/is_sorted/requirements/explicit_instantiation/2.cc new file mode 100644 index 00000000000..40052015db5 --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/is_sorted/requirements/explicit_instantiation/2.cc @@ -0,0 +1,47 @@ +// { dg-do compile } +// { dg-options "-std=gnu++0x" } + +// 2007-10-14 Paolo Carlini + +// Copyright (C) 2007 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#include +#include +#include + +namespace std +{ + using __gnu_test::NonDefaultConstructible; + + typedef NonDefaultConstructible value_type; + typedef value_type* iterator_type; + typedef std::less compare_type; + + template bool is_sorted(iterator_type, iterator_type); + template bool is_sorted(iterator_type, iterator_type, compare_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/is_sorted/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/is_sorted/requirements/explicit_instantiation/pod.cc new file mode 100644 index 00000000000..9a2e5560790 --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/is_sorted/requirements/explicit_instantiation/pod.cc @@ -0,0 +1,46 @@ +// { dg-do compile } +// { dg-options "-std=gnu++0x" } + +// 2007-10-14 Paolo Carlini + +// Copyright (C) 2007 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#include +#include + +namespace std +{ + using __gnu_test::pod_int; + + typedef pod_int value_type; + typedef value_type* iterator_type; + typedef std::less compare_type; + + template bool is_sorted(iterator_type, iterator_type); + template bool is_sorted(iterator_type, iterator_type, compare_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/is_sorted_until/1.cc b/libstdc++-v3/testsuite/25_algorithms/is_sorted_until/1.cc new file mode 100644 index 00000000000..7be31eedecd --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/is_sorted_until/1.cc @@ -0,0 +1,52 @@ +// { dg-options "-std=gnu++0x" } + +// 2007-10-14 Paolo Carlini +// +// Copyright (C) 2007 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without Pred the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +// USA. + +// 25.3.6 Heap operations [lib.alg.heap.operations] + +#include +#include +#include + +int A[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}; +int B[] = {9, 8, 7, 6, 5, 4, 3, 2, 1, 0}; +const int N = sizeof(A) / sizeof(int); + +void +test01() +{ + bool test __attribute__((unused)) = true; + + for (int i = 0; i <= N; ++i) + { + VERIFY( A + i == std::is_sorted_until(A, A + i) ); + VERIFY( A + i == std::is_sorted_until(A, A + i, std::less()) ); + VERIFY( B + i == std::is_sorted_until(B, B + i, std::greater()) ); + VERIFY( B + (i < 2 ? i : 1) == std::is_sorted_until(B, B + i) ); + } +} + +int +main() +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/25_algorithms/is_sorted_until/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/is_sorted_until/requirements/explicit_instantiation/2.cc new file mode 100644 index 00000000000..f13f7b008b0 --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/is_sorted_until/requirements/explicit_instantiation/2.cc @@ -0,0 +1,48 @@ +// { dg-do compile } +// { dg-options "-std=gnu++0x" } + +// 2007-10-14 Paolo Carlini + +// Copyright (C) 2007 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#include +#include +#include + +namespace std +{ + using __gnu_test::NonDefaultConstructible; + + typedef NonDefaultConstructible value_type; + typedef value_type* iterator_type; + typedef std::less compare_type; + + template iterator_type is_sorted_until(iterator_type, iterator_type); + template iterator_type is_sorted_until(iterator_type, iterator_type, + compare_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/is_sorted_until/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/is_sorted_until/requirements/explicit_instantiation/pod.cc new file mode 100644 index 00000000000..d6a473f34fc --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/is_sorted_until/requirements/explicit_instantiation/pod.cc @@ -0,0 +1,47 @@ +// { dg-do compile } +// { dg-options "-std=gnu++0x" } + +// 2007-10-14 Paolo Carlini + +// Copyright (C) 2007 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#include +#include + +namespace std +{ + using __gnu_test::pod_int; + + typedef pod_int value_type; + typedef value_type* iterator_type; + typedef std::less compare_type; + + template iterator_type is_sorted_until(iterator_type, iterator_type); + template iterator_type is_sorted_until(iterator_type, iterator_type, + compare_type); +}