From 4f99f3d0e5aa2db0879a8719143354d00ba693a9 Mon Sep 17 00:00:00 2001 From: Benjamin Kosnik Date: Wed, 26 Sep 2007 17:04:06 +0000 Subject: [PATCH] stl_algo.h: Add return type information to comments. 2007-09-26 Benjamin Kosnik * include/bits/stl_algo.h: Add return type information to comments. * include/bits/algorithmfwd.h: Formatting. * testsuite/util/testsuite_hooks.h (NonDefaultConstructible): Move.. * testsuite/util/testsuite_api.h: ...here. Add necessary operators for use in testing chapters 25 and 26. * testsuite/util/testsuite_character.h: Same. * testsuite/25_algorithms/*/requirements/explicit_instantiation/ 2.cc, pod.cc: New. * testsuite/26_numerics/accumulate, adjacent_difference, inner_product, partial_sum/requirements/explicit_instantiation/2.cc, pod.cc: New. * testsuite/26_numerics/numeric_arrays/*: Move contents into testsuite/26_numerics. * testsuite/26_numerics/numeric_operations: Same. * testsuite/23_containers/*/requirements/explicit_instantiation/2.cc: Adjust includes from testsuite_eh.h to testsuite_api.h. Co-Authored-By: Chalathip Thumkanon From-SVN: r128822 --- libstdc++-v3/ChangeLog | 25 +++++++- libstdc++-v3/include/bits/algorithmfwd.h | 19 +++--- libstdc++-v3/include/bits/stl_algo.h | 6 +- .../requirements/explicit_instantiation/2.cc | 1 + .../requirements/explicit_instantiation/2.cc | 1 + .../requirements/explicit_instantiation/2.cc | 1 + .../requirements/explicit_instantiation/2.cc | 1 + .../requirements/explicit_instantiation/2.cc | 1 + .../requirements/explicit_instantiation/2.cc | 1 + .../requirements/explicit_instantiation/2.cc | 1 + .../requirements/explicit_instantiation/2.cc | 43 +++++++++++++ .../explicit_instantiation/pod.cc | 43 +++++++++++++ .../requirements/explicit_instantiation/2.cc | 47 ++++++++++++++ .../explicit_instantiation/pod.cc | 47 ++++++++++++++ .../requirements/explicit_instantiation/2.cc | 43 +++++++++++++ .../explicit_instantiation/pod.cc | 43 +++++++++++++ .../requirements/explicit_instantiation/2.cc | 45 +++++++++++++ .../explicit_instantiation/pod.cc | 45 +++++++++++++ .../requirements/explicit_instantiation/2.cc | 45 +++++++++++++ .../explicit_instantiation/pod.cc | 45 +++++++++++++ .../requirements/explicit_instantiation/2.cc | 45 +++++++++++++ .../explicit_instantiation/pod.cc | 45 +++++++++++++ .../requirements/explicit_instantiation/2.cc | 45 +++++++++++++ .../explicit_instantiation/pod.cc | 45 +++++++++++++ .../requirements/explicit_instantiation/2.cc | 50 +++++++++++++++ .../explicit_instantiation/pod.cc | 50 +++++++++++++++ .../requirements/explicit_instantiation/2.cc | 43 +++++++++++++ .../explicit_instantiation/pod.cc | 43 +++++++++++++ .../requirements/explicit_instantiation/2.cc | 45 +++++++++++++ .../explicit_instantiation/pod.cc | 45 +++++++++++++ .../requirements/explicit_instantiation/2.cc | 43 +++++++++++++ .../explicit_instantiation/pod.cc | 43 +++++++++++++ .../requirements/explicit_instantiation/2.cc | 49 +++++++++++++++ .../explicit_instantiation/pod.cc | 49 +++++++++++++++ .../requirements/explicit_instantiation/2.cc | 49 +++++++++++++++ .../explicit_instantiation/pod.cc | 49 +++++++++++++++ .../requirements/explicit_instantiation/2.cc | 44 +++++++++++++ .../explicit_instantiation/pod.cc | 44 +++++++++++++ .../requirements/explicit_instantiation/2.cc | 45 +++++++++++++ .../explicit_instantiation/pod.cc | 45 +++++++++++++ .../requirements/explicit_instantiation/2.cc | 46 ++++++++++++++ .../explicit_instantiation/pod.cc | 46 ++++++++++++++ .../requirements/explicit_instantiation/2.cc | 47 ++++++++++++++ .../explicit_instantiation/pod.cc | 47 ++++++++++++++ .../requirements/explicit_instantiation/2.cc | 48 ++++++++++++++ .../explicit_instantiation/pod.cc | 48 ++++++++++++++ .../requirements/explicit_instantiation/2.cc | 47 ++++++++++++++ .../explicit_instantiation/pod.cc | 47 ++++++++++++++ .../requirements/explicit_instantiation/2.cc | 43 +++++++++++++ .../explicit_instantiation/pod.cc | 43 +++++++++++++ .../requirements/explicit_instantiation/2.cc | 49 +++++++++++++++ .../explicit_instantiation/pod.cc | 49 +++++++++++++++ .../requirements/explicit_instantiation/2.cc | 48 ++++++++++++++ .../explicit_instantiation/pod.cc | 48 ++++++++++++++ .../requirements/explicit_instantiation/2.cc | 45 +++++++++++++ .../explicit_instantiation/pod.cc | 45 +++++++++++++ .../requirements/explicit_instantiation/2.cc | 47 ++++++++++++++ .../explicit_instantiation/pod.cc | 47 ++++++++++++++ .../requirements/explicit_instantiation/2.cc | 47 ++++++++++++++ .../explicit_instantiation/pod.cc | 47 ++++++++++++++ .../requirements/explicit_instantiation/2.cc | 48 ++++++++++++++ .../explicit_instantiation/pod.cc | 48 ++++++++++++++ .../requirements/explicit_instantiation/2.cc | 46 ++++++++++++++ .../explicit_instantiation/pod.cc | 46 ++++++++++++++ .../requirements/explicit_instantiation/2.cc | 47 ++++++++++++++ .../explicit_instantiation/pod.cc | 47 ++++++++++++++ .../requirements/explicit_instantiation/2.cc | 45 +++++++++++++ .../explicit_instantiation/pod.cc | 45 +++++++++++++ .../requirements/explicit_instantiation/2.cc | 46 ++++++++++++++ .../explicit_instantiation/pod.cc | 46 ++++++++++++++ .../requirements/explicit_instantiation/2.cc | 46 ++++++++++++++ .../explicit_instantiation/pod.cc | 46 ++++++++++++++ .../requirements/explicit_instantiation/2.cc | 49 +++++++++++++++ .../explicit_instantiation/pod.cc | 49 +++++++++++++++ .../requirements/explicit_instantiation/2.cc | 45 +++++++++++++ .../explicit_instantiation/pod.cc | 45 +++++++++++++ .../requirements/explicit_instantiation/2.cc | 44 +++++++++++++ .../explicit_instantiation/pod.cc | 44 +++++++++++++ .../requirements/explicit_instantiation/2.cc | 45 +++++++++++++ .../explicit_instantiation/pod.cc | 45 +++++++++++++ .../requirements/explicit_instantiation/2.cc | 45 +++++++++++++ .../explicit_instantiation/pod.cc | 45 +++++++++++++ .../requirements/explicit_instantiation/2.cc | 46 ++++++++++++++ .../explicit_instantiation/pod.cc | 46 ++++++++++++++ .../requirements/explicit_instantiation/2.cc | 44 +++++++++++++ .../explicit_instantiation/pod.cc | 44 +++++++++++++ .../requirements/explicit_instantiation/2.cc | 44 +++++++++++++ .../explicit_instantiation/pod.cc | 44 +++++++++++++ .../requirements/explicit_instantiation/2.cc | 45 +++++++++++++ .../explicit_instantiation/pod.cc | 45 +++++++++++++ .../requirements/explicit_instantiation/2.cc | 45 +++++++++++++ .../explicit_instantiation/pod.cc | 45 +++++++++++++ .../requirements/explicit_instantiation/2.cc | 44 +++++++++++++ .../explicit_instantiation/pod.cc | 44 +++++++++++++ .../requirements/explicit_instantiation/2.cc | 45 +++++++++++++ .../explicit_instantiation/pod.cc | 45 +++++++++++++ .../requirements/explicit_instantiation/2.cc | 46 ++++++++++++++ .../explicit_instantiation/pod.cc | 46 ++++++++++++++ .../requirements/explicit_instantiation/2.cc | 45 +++++++++++++ .../explicit_instantiation/pod.cc | 45 +++++++++++++ .../requirements/explicit_instantiation/2.cc | 43 +++++++++++++ .../explicit_instantiation/pod.cc | 43 +++++++++++++ .../reverse_copy/explicit_instantiation/2.cc | 44 +++++++++++++ .../explicit_instantiation/pod.cc | 44 +++++++++++++ .../requirements/explicit_instantiation/2.cc | 43 +++++++++++++ .../explicit_instantiation/pod.cc | 43 +++++++++++++ .../requirements/explicit_instantiation/2.cc | 44 +++++++++++++ .../explicit_instantiation/pod.cc | 44 +++++++++++++ .../requirements/explicit_instantiation/2.cc | 48 ++++++++++++++ .../explicit_instantiation/pod.cc | 48 ++++++++++++++ .../requirements/explicit_instantiation/2.cc | 49 +++++++++++++++ .../explicit_instantiation/pod.cc | 49 +++++++++++++++ .../requirements/explicit_instantiation/2.cc | 50 +++++++++++++++ .../explicit_instantiation/pod.cc | 50 +++++++++++++++ .../requirements/explicit_instantiation/2.cc | 50 +++++++++++++++ .../explicit_instantiation/pod.cc | 50 +++++++++++++++ .../requirements/explicit_instantiation/2.cc | 50 +++++++++++++++ .../explicit_instantiation/pod.cc | 50 +++++++++++++++ .../requirements/explicit_instantiation/2.cc | 48 ++++++++++++++ .../explicit_instantiation/pod.cc | 48 ++++++++++++++ .../requirements/explicit_instantiation/2.cc | 45 +++++++++++++ .../explicit_instantiation/pod.cc | 45 +++++++++++++ .../requirements/explicit_instantiation/2.cc | 46 ++++++++++++++ .../explicit_instantiation/pod.cc | 46 ++++++++++++++ .../requirements/explicit_instantiation/2.cc | 44 +++++++++++++ .../explicit_instantiation/pod.cc | 44 +++++++++++++ .../requirements/explicit_instantiation/2.cc | 46 ++++++++++++++ .../explicit_instantiation/pod.cc | 46 ++++++++++++++ .../requirements/explicit_instantiation/2.cc | 43 +++++++++++++ .../explicit_instantiation/pod.cc | 43 +++++++++++++ .../requirements/explicit_instantiation/2.cc | 44 +++++++++++++ .../explicit_instantiation/pod.cc | 44 +++++++++++++ .../requirements/explicit_instantiation/2.cc | 48 ++++++++++++++ .../explicit_instantiation/pod.cc | 48 ++++++++++++++ .../requirements/explicit_instantiation/2.cc | 45 +++++++++++++ .../explicit_instantiation/pod.cc | 45 +++++++++++++ .../requirements/explicit_instantiation/2.cc | 46 ++++++++++++++ .../explicit_instantiation/pod.cc | 46 ++++++++++++++ .../requirements/explicit_instantiation/2.cc | 47 ++++++++++++++ .../explicit_instantiation/pod.cc | 47 ++++++++++++++ .../requirements/explicit_instantiation/2.cc | 41 ++++++++++++ .../explicit_instantiation/pod.cc | 41 ++++++++++++ .../sum_diff.cc => adjacent_difference/1.cc} | 3 - .../requirements/explicit_instantiation/2.cc | 45 +++++++++++++ .../explicit_instantiation/pod.cc | 45 +++++++++++++ .../requirements/explicit_instantiation/2.cc | 43 +++++++++++++ .../explicit_instantiation/pod.cc | 43 +++++++++++++ .../testsuite/26_numerics/partial_sum/1.cc | 46 ++++++++++++++ .../requirements/explicit_instantiation/2.cc | 44 +++++++++++++ .../explicit_instantiation/pod.cc | 44 +++++++++++++ .../{numeric_arrays/slice.cc => slice/1.cc} | 0 .../slice_array/array_assignment.cc | 0 .../requirements/explicit_instantiation.cc | 0 .../slice_array/requirements/typedefs.cc | 0 .../{numeric_arrays => }/valarray/27867.cc | 0 .../{numeric_arrays => }/valarray/28277.cc | 0 .../{numeric_arrays => }/valarray/30416.cc | 0 .../{numeric_arrays => }/valarray/33084.cc | 0 .../{numeric_arrays => }/valarray/algo.cc | 0 .../valarray/binary_closure.cc | 0 .../valarray/const_bracket.cc | 0 .../{numeric_arrays => }/valarray/dr543.cc | 0 .../valarray/name_lookup.cc | 0 .../valarray/operators.cc | 0 .../requirements/explicit_instantiation.cc | 0 .../valarray/requirements/typedefs.cc | 0 .../valarray/subset_assignment.cc | 0 libstdc++-v3/testsuite/util/testsuite_api.h | 63 ++++++++++++++++++- .../testsuite/util/testsuite_character.h | 25 ++++++++ libstdc++-v3/testsuite/util/testsuite_hooks.h | 18 ------ 170 files changed, 6487 insertions(+), 33 deletions(-) create mode 100644 libstdc++-v3/testsuite/25_algorithms/adjacent_find/requirements/explicit_instantiation/2.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/adjacent_find/requirements/explicit_instantiation/pod.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/binary_search/requirements/explicit_instantiation/2.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/binary_search/requirements/explicit_instantiation/pod.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/copy/requirements/explicit_instantiation/2.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/copy/requirements/explicit_instantiation/pod.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/copy_backward/requirements/explicit_instantiation/2.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/copy_backward/requirements/explicit_instantiation/pod.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/count/requirements/explicit_instantiation/2.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/count/requirements/explicit_instantiation/pod.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/count_if/requirements/explicit_instantiation/2.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/count_if/requirements/explicit_instantiation/pod.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/equal/requirements/explicit_instantiation/2.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/equal/requirements/explicit_instantiation/pod.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/equal_range/requirements/explicit_instantiation/2.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/equal_range/requirements/explicit_instantiation/pod.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/fill/requirements/explicit_instantiation/2.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/fill/requirements/explicit_instantiation/pod.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/fill_n/requirements/explicit_instantiation/2.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/fill_n/requirements/explicit_instantiation/pod.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/find/requirements/explicit_instantiation/2.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/find/requirements/explicit_instantiation/pod.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/find_end/requirements/explicit_instantiation/2.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/find_end/requirements/explicit_instantiation/pod.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/find_first_of/requirements/explicit_instantiation/2.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/find_first_of/requirements/explicit_instantiation/pod.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/find_if/requirements/explicit_instantiation/2.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/find_if/requirements/explicit_instantiation/pod.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/for_each/requirements/explicit_instantiation/2.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/for_each/requirements/explicit_instantiation/pod.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/generate/requirements/explicit_instantiation/2.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/generate/requirements/explicit_instantiation/pod.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/generate_n/requirements/explicit_instantiation/2.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/generate_n/requirements/explicit_instantiation/pod.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/includes/requirements/explicit_instantiation/2.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/includes/requirements/explicit_instantiation/pod.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/inplace_merge/requirements/explicit_instantiation/2.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/inplace_merge/requirements/explicit_instantiation/pod.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/iter_swap/requirements/explicit_instantiation/2.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/iter_swap/requirements/explicit_instantiation/pod.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/lexicographical_compare/requirements/explicit_instantiation/2.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/lexicographical_compare/requirements/explicit_instantiation/pod.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/lower_bound/requirements/explicit_instantiation/2.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/lower_bound/requirements/explicit_instantiation/pod.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/make_heap/requirements/explicit_instantiation/2.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/make_heap/requirements/explicit_instantiation/pod.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/max/requirements/explicit_instantiation/2.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/max/requirements/explicit_instantiation/pod.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/max_element/requirements/explicit_instantiation/2.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/max_element/requirements/explicit_instantiation/pod.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/merge/requirements/explicit_instantiation/2.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/merge/requirements/explicit_instantiation/pod.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/min/requirements/explicit_instantiation/2.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/min/requirements/explicit_instantiation/pod.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/min_element/requirements/explicit_instantiation/2.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/min_element/requirements/explicit_instantiation/pod.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/next_permutation/requirements/explicit_instantiation/2.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/next_permutation/requirements/explicit_instantiation/pod.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/nth_element/requirements/explicit_instantiation/2.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/nth_element/requirements/explicit_instantiation/pod.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/partial_sort/requirements/explicit_instantiation/2.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/partial_sort/requirements/explicit_instantiation/pod.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/partial_sort_copy/requirements/explicit_instantiation/2.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/partial_sort_copy/requirements/explicit_instantiation/pod.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/partition/requirements/explicit_instantiation/2.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/partition/requirements/explicit_instantiation/pod.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/pop_heap/requirements/explicit_instantiation/2.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/pop_heap/requirements/explicit_instantiation/pod.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/prev_permutation/requirements/explicit_instantiation/2.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/prev_permutation/requirements/explicit_instantiation/pod.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/push_heap/requirements/explicit_instantiation/2.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/push_heap/requirements/explicit_instantiation/pod.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/random_shuffle/requirements/explicit_instantiation/2.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/random_shuffle/requirements/explicit_instantiation/pod.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/remove/requirements/explicit_instantiation/2.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/remove/requirements/explicit_instantiation/pod.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/remove_copy/requirements/explicit_instantiation/2.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/remove_copy/requirements/explicit_instantiation/pod.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/remove_copy_if/requirements/explicit_instantiation/2.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/remove_copy_if/requirements/explicit_instantiation/pod.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/remove_if/requirements/explicit_instantiation/2.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/remove_if/requirements/explicit_instantiation/pod.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/replace/requirements/explicit_instantiation/2.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/replace/requirements/explicit_instantiation/pod.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/replace_copy/requirements/explicit_instantiation/2.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/replace_copy/requirements/explicit_instantiation/pod.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/replace_copy_if/requirements/explicit_instantiation/2.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/replace_copy_if/requirements/explicit_instantiation/pod.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/replace_if/requirements/explicit_instantiation/2.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/replace_if/requirements/explicit_instantiation/pod.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/reverse/requirements/explicit_instantiation/2.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/reverse/requirements/explicit_instantiation/pod.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/reverse_copy/explicit_instantiation/2.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/reverse_copy/explicit_instantiation/pod.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/rotate/requirements/explicit_instantiation/2.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/rotate/requirements/explicit_instantiation/pod.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/rotate_copy/requirements/explicit_instantiation/2.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/rotate_copy/requirements/explicit_instantiation/pod.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/search/requirements/explicit_instantiation/2.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/search/requirements/explicit_instantiation/pod.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/search_n/requirements/explicit_instantiation/2.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/search_n/requirements/explicit_instantiation/pod.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/set_difference/requirements/explicit_instantiation/2.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/set_difference/requirements/explicit_instantiation/pod.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/set_intersection/requirements/explicit_instantiation/2.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/set_intersection/requirements/explicit_instantiation/pod.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/set_symmetric_difference/requirements/explicit_instantiation/2.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/set_symmetric_difference/requirements/explicit_instantiation/pod.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/set_union/requirements/explicit_instantiation/2.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/set_union/requirements/explicit_instantiation/pod.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/sort/requirements/explicit_instantiation/2.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/sort/requirements/explicit_instantiation/pod.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/sort_heap/requirements/explicit_instantiation/2.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/sort_heap/requirements/explicit_instantiation/pod.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/stable_partition/requirements/explicit_instantiation/2.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/stable_partition/requirements/explicit_instantiation/pod.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/stable_sort/requirements/explicit_instantiation/2.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/stable_sort/requirements/explicit_instantiation/pod.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/swap/requirements/explicit_instantiation/2.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/swap/requirements/explicit_instantiation/pod.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/swap_ranges/requirements/explicit_instantiation/2.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/swap_ranges/requirements/explicit_instantiation/pod.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/transform/requirements/explicit_instantiation/2.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/transform/requirements/explicit_instantiation/pod.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/unique/requirements/explicit_instantiation/2.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/unique/requirements/explicit_instantiation/pod.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/unique_copy/requirements/explicit_instantiation/2.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/unique_copy/requirements/explicit_instantiation/pod.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/upper_bound/requirements/explicit_instantiation/2.cc create mode 100644 libstdc++-v3/testsuite/25_algorithms/upper_bound/requirements/explicit_instantiation/pod.cc create mode 100644 libstdc++-v3/testsuite/26_numerics/accumulate/requirements/explicit_instantiation/2.cc create mode 100644 libstdc++-v3/testsuite/26_numerics/accumulate/requirements/explicit_instantiation/pod.cc rename libstdc++-v3/testsuite/26_numerics/{numeric_operations/sum_diff.cc => adjacent_difference/1.cc} (94%) create mode 100644 libstdc++-v3/testsuite/26_numerics/adjacent_difference/requirements/explicit_instantiation/2.cc create mode 100644 libstdc++-v3/testsuite/26_numerics/adjacent_difference/requirements/explicit_instantiation/pod.cc create mode 100644 libstdc++-v3/testsuite/26_numerics/inner_product/requirements/explicit_instantiation/2.cc create mode 100644 libstdc++-v3/testsuite/26_numerics/inner_product/requirements/explicit_instantiation/pod.cc create mode 100644 libstdc++-v3/testsuite/26_numerics/partial_sum/1.cc create mode 100644 libstdc++-v3/testsuite/26_numerics/partial_sum/requirements/explicit_instantiation/2.cc create mode 100644 libstdc++-v3/testsuite/26_numerics/partial_sum/requirements/explicit_instantiation/pod.cc rename libstdc++-v3/testsuite/26_numerics/{numeric_arrays/slice.cc => slice/1.cc} (100%) rename libstdc++-v3/testsuite/26_numerics/{numeric_arrays => }/slice_array/array_assignment.cc (100%) rename libstdc++-v3/testsuite/26_numerics/{numeric_arrays => }/slice_array/requirements/explicit_instantiation.cc (100%) rename libstdc++-v3/testsuite/26_numerics/{numeric_arrays => }/slice_array/requirements/typedefs.cc (100%) rename libstdc++-v3/testsuite/26_numerics/{numeric_arrays => }/valarray/27867.cc (100%) rename libstdc++-v3/testsuite/26_numerics/{numeric_arrays => }/valarray/28277.cc (100%) rename libstdc++-v3/testsuite/26_numerics/{numeric_arrays => }/valarray/30416.cc (100%) rename libstdc++-v3/testsuite/26_numerics/{numeric_arrays => }/valarray/33084.cc (100%) rename libstdc++-v3/testsuite/26_numerics/{numeric_arrays => }/valarray/algo.cc (100%) rename libstdc++-v3/testsuite/26_numerics/{numeric_arrays => }/valarray/binary_closure.cc (100%) rename libstdc++-v3/testsuite/26_numerics/{numeric_arrays => }/valarray/const_bracket.cc (100%) rename libstdc++-v3/testsuite/26_numerics/{numeric_arrays => }/valarray/dr543.cc (100%) rename libstdc++-v3/testsuite/26_numerics/{numeric_arrays => }/valarray/name_lookup.cc (100%) rename libstdc++-v3/testsuite/26_numerics/{numeric_arrays => }/valarray/operators.cc (100%) rename libstdc++-v3/testsuite/26_numerics/{numeric_arrays => }/valarray/requirements/explicit_instantiation.cc (100%) rename libstdc++-v3/testsuite/26_numerics/{numeric_arrays => }/valarray/requirements/typedefs.cc (100%) rename libstdc++-v3/testsuite/26_numerics/{numeric_arrays => }/valarray/subset_assignment.cc (100%) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index f274975795f5..f491bda9dafd 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,8 +1,31 @@ +2007-09-26 Benjamin Kosnik + + * include/bits/stl_algo.h: Add return type information to comments. + * include/bits/algorithmfwd.h: Formatting. + * testsuite/util/testsuite_hooks.h (NonDefaultConstructible): Move.. + * testsuite/util/testsuite_api.h: ...here. Add necessary operators + for use in testing chapters 25 and 26. + * testsuite/util/testsuite_character.h: Same. + + * testsuite/25_algorithms/*/requirements/explicit_instantiation/ + 2.cc, pod.cc: New. + + * testsuite/26_numerics/accumulate, adjacent_difference, inner_product, + partial_sum/requirements/explicit_instantiation/2.cc, pod.cc: New. + + * testsuite/26_numerics/numeric_arrays/*: Move contents into + testsuite/26_numerics. + + * testsuite/26_numerics/numeric_operations: Same. + + * testsuite/23_containers/*/requirements/explicit_instantiation/2.cc: + Adjust includes from testsuite_eh.h to testsuite_api.h. + 2007-09-25 Richard Sandiford * testsuite/lib/libstdc++.exp (check_v3_target_fileio): Test lseek. -2007-09-17 Benjamin Kosnik +2007-09-18 Benjamin Kosnik Chalathip Thumkanon PR libstdc++/32819 diff --git a/libstdc++-v3/include/bits/algorithmfwd.h b/libstdc++-v3/include/bits/algorithmfwd.h index 1b2bf23ace6a..0b61864759c8 100644 --- a/libstdc++-v3/include/bits/algorithmfwd.h +++ b/libstdc++-v3/include/bits/algorithmfwd.h @@ -23,7 +23,6 @@ * You should not attempt to use it directly. */ - /* adjacent_find binary_search @@ -85,7 +84,6 @@ sort_heap stable_partition stable_sort - stable_sort swap swap_ranges transform @@ -121,7 +119,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) template _BIter2 - copy_backward (_BIter1, _BIter1, _BIter2); + copy_backward(_BIter1, _BIter1, _BIter2); // count // count_if @@ -310,7 +308,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) template _OIter - rotate_copy (_FIter, _FIter, _FIter, _OIter); + rotate_copy(_FIter, _FIter, _FIter, _OIter); // search // search_n @@ -333,11 +331,11 @@ _GLIBCXX_BEGIN_NAMESPACE(std) template void - swap(_Tp&, _Tp& b); + swap(_Tp&, _Tp&); template _FIter2 - swap_ranges(_FIter1 first1, _FIter1, _FIter2); + swap_ranges(_FIter1, _FIter1, _FIter2); // transform @@ -419,8 +417,15 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_P) void generate(_FIter, _FIter, _Generator); +/* + XXX NB: return type different from ISO C++. + template + void + generate_n(_OIter, _Size, _Generator); +*/ + template - void + _OIter generate_n(_OIter, _Size, _Generator); template diff --git a/libstdc++-v3/include/bits/stl_algo.h b/libstdc++-v3/include/bits/stl_algo.h index d03ae139e563..561609d6037f 100644 --- a/libstdc++-v3/include/bits/stl_algo.h +++ b/libstdc++-v3/include/bits/stl_algo.h @@ -4248,7 +4248,8 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_P) * sequence. * @param first A forward iterator. * @param last A forward iterator. - * @param gen A function object taking no arguments. + * @param gen A function object taking no arguments and returning + * std::iterator_traits<_ForwardIterator>::value_type * @return generate() returns no value. * * Performs the assignment @c *i = @p gen() for each @c i in the range @@ -4274,7 +4275,8 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_P) * sequence. * @param first A forward iterator. * @param n The length of the sequence. - * @param gen A function object taking no arguments. + * @param gen A function object taking no arguments and returning + * std::iterator_traits<_ForwardIterator>::value_type * @return The end of the sequence, @p first+n * * Performs the assignment @c *i = @p gen() for each @c i in the range diff --git a/libstdc++-v3/testsuite/23_containers/deque/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/23_containers/deque/requirements/explicit_instantiation/2.cc index 6c1b9adb7867..697776e973df 100644 --- a/libstdc++-v3/testsuite/23_containers/deque/requirements/explicit_instantiation/2.cc +++ b/libstdc++-v3/testsuite/23_containers/deque/requirements/explicit_instantiation/2.cc @@ -29,6 +29,7 @@ #include #include +#include // { dg-do compile } diff --git a/libstdc++-v3/testsuite/23_containers/list/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/23_containers/list/requirements/explicit_instantiation/2.cc index 8b27d10251bd..9c052d8d4801 100644 --- a/libstdc++-v3/testsuite/23_containers/list/requirements/explicit_instantiation/2.cc +++ b/libstdc++-v3/testsuite/23_containers/list/requirements/explicit_instantiation/2.cc @@ -29,6 +29,7 @@ #include #include +#include // { dg-do compile } diff --git a/libstdc++-v3/testsuite/23_containers/map/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/23_containers/map/requirements/explicit_instantiation/2.cc index 433349434c10..5640653b3e1a 100644 --- a/libstdc++-v3/testsuite/23_containers/map/requirements/explicit_instantiation/2.cc +++ b/libstdc++-v3/testsuite/23_containers/map/requirements/explicit_instantiation/2.cc @@ -29,6 +29,7 @@ #include #include +#include // { dg-do compile } diff --git a/libstdc++-v3/testsuite/23_containers/multimap/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/23_containers/multimap/requirements/explicit_instantiation/2.cc index 86527fd1fb86..2a624a5fce32 100644 --- a/libstdc++-v3/testsuite/23_containers/multimap/requirements/explicit_instantiation/2.cc +++ b/libstdc++-v3/testsuite/23_containers/multimap/requirements/explicit_instantiation/2.cc @@ -29,6 +29,7 @@ #include #include +#include // { dg-do compile } diff --git a/libstdc++-v3/testsuite/23_containers/multiset/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/23_containers/multiset/requirements/explicit_instantiation/2.cc index c1e69b76832e..043d760acbe6 100644 --- a/libstdc++-v3/testsuite/23_containers/multiset/requirements/explicit_instantiation/2.cc +++ b/libstdc++-v3/testsuite/23_containers/multiset/requirements/explicit_instantiation/2.cc @@ -29,6 +29,7 @@ #include #include +#include // { dg-do compile } diff --git a/libstdc++-v3/testsuite/23_containers/set/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/23_containers/set/requirements/explicit_instantiation/2.cc index 44bc5debb515..510e0b3d474d 100644 --- a/libstdc++-v3/testsuite/23_containers/set/requirements/explicit_instantiation/2.cc +++ b/libstdc++-v3/testsuite/23_containers/set/requirements/explicit_instantiation/2.cc @@ -29,6 +29,7 @@ #include #include +#include // { dg-do compile } diff --git a/libstdc++-v3/testsuite/23_containers/vector/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/23_containers/vector/requirements/explicit_instantiation/2.cc index 0a48971380e7..4bc1c79c066e 100644 --- a/libstdc++-v3/testsuite/23_containers/vector/requirements/explicit_instantiation/2.cc +++ b/libstdc++-v3/testsuite/23_containers/vector/requirements/explicit_instantiation/2.cc @@ -29,6 +29,7 @@ #include #include +#include // { dg-do compile } diff --git a/libstdc++-v3/testsuite/25_algorithms/adjacent_find/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/adjacent_find/requirements/explicit_instantiation/2.cc new file mode 100644 index 000000000000..e90c083d801c --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/adjacent_find/requirements/explicit_instantiation/2.cc @@ -0,0 +1,43 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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::NonDefaultConstructible; + + typedef NonDefaultConstructible value_type; + typedef value_type* iterator_type; + + template iterator_type adjacent_find(iterator_type, iterator_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/adjacent_find/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/adjacent_find/requirements/explicit_instantiation/pod.cc new file mode 100644 index 000000000000..5612b7e30a5e --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/adjacent_find/requirements/explicit_instantiation/pod.cc @@ -0,0 +1,43 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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; + + template iterator_type adjacent_find(iterator_type, iterator_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/binary_search/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/binary_search/requirements/explicit_instantiation/2.cc new file mode 100644 index 000000000000..3b770a7d9aa9 --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/binary_search/requirements/explicit_instantiation/2.cc @@ -0,0 +1,47 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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::NonDefaultConstructible; + + typedef NonDefaultConstructible value_type; + typedef value_type* iterator_type; + typedef std::less compare_type; + + template bool binary_search(iterator_type, iterator_type, const value_type&); + + template bool binary_search(iterator_type, iterator_type, + const value_type&, compare_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/binary_search/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/binary_search/requirements/explicit_instantiation/pod.cc new file mode 100644 index 000000000000..d8a40b68f224 --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/binary_search/requirements/explicit_instantiation/pod.cc @@ -0,0 +1,47 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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 binary_search(iterator_type, iterator_type, const value_type&); + + template bool binary_search(iterator_type, iterator_type, + const value_type&, compare_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/copy/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/copy/requirements/explicit_instantiation/2.cc new file mode 100644 index 000000000000..e4dc282e5778 --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/copy/requirements/explicit_instantiation/2.cc @@ -0,0 +1,43 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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::NonDefaultConstructible; + + typedef NonDefaultConstructible value_type; + typedef value_type* iterator_type; + + template iterator_type copy(iterator_type, iterator_type, iterator_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/copy/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/copy/requirements/explicit_instantiation/pod.cc new file mode 100644 index 000000000000..f5dda9e3bfd2 --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/copy/requirements/explicit_instantiation/pod.cc @@ -0,0 +1,43 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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; + + template iterator_type copy(iterator_type, iterator_type, iterator_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/copy_backward/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/copy_backward/requirements/explicit_instantiation/2.cc new file mode 100644 index 000000000000..d569a07dc1c4 --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/copy_backward/requirements/explicit_instantiation/2.cc @@ -0,0 +1,45 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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::NonDefaultConstructible; + + typedef NonDefaultConstructible value_type; + typedef value_type* iterator_type; + typedef unsigned short size_type; + + template iterator_type copy_backward(iterator_type, iterator_type, + iterator_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/copy_backward/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/copy_backward/requirements/explicit_instantiation/pod.cc new file mode 100644 index 000000000000..593bf46c1472 --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/copy_backward/requirements/explicit_instantiation/pod.cc @@ -0,0 +1,45 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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 unsigned short size_type; + + template iterator_type copy_backward(iterator_type, iterator_type, + iterator_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/count/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/count/requirements/explicit_instantiation/2.cc new file mode 100644 index 000000000000..604ab5341bff --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/count/requirements/explicit_instantiation/2.cc @@ -0,0 +1,45 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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::NonDefaultConstructible; + + typedef NonDefaultConstructible value_type; + typedef value_type* iterator_type; + typedef iterator_traits::difference_type difference_type; + + template difference_type count(iterator_type, iterator_type, + const value_type&); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/count/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/count/requirements/explicit_instantiation/pod.cc new file mode 100644 index 000000000000..90a0133f3b7c --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/count/requirements/explicit_instantiation/pod.cc @@ -0,0 +1,45 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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 iterator_traits::difference_type difference_type; + + template difference_type count(iterator_type, iterator_type, + const value_type&); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/count_if/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/count_if/requirements/explicit_instantiation/2.cc new file mode 100644 index 000000000000..f2fbe280f4db --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/count_if/requirements/explicit_instantiation/2.cc @@ -0,0 +1,45 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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::NonDefaultConstructible; + + typedef NonDefaultConstructible value_type; + typedef value_type* iterator_type; + typedef std::iterator_traits::difference_type difference_type; + typedef std::pointer_to_unary_function predicate_type; + + template difference_type count_if(iterator_type, iterator_type, predicate_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/count_if/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/count_if/requirements/explicit_instantiation/pod.cc new file mode 100644 index 000000000000..9d9ae79745f2 --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/count_if/requirements/explicit_instantiation/pod.cc @@ -0,0 +1,45 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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::iterator_traits::difference_type difference_type; + typedef std::pointer_to_unary_function predicate_type; + + template difference_type count_if(iterator_type, iterator_type, predicate_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/equal/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/equal/requirements/explicit_instantiation/2.cc new file mode 100644 index 000000000000..ec35b44d69d1 --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/equal/requirements/explicit_instantiation/2.cc @@ -0,0 +1,45 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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::NonDefaultConstructible; + + typedef NonDefaultConstructible value_type; + typedef value_type* iterator_type; + typedef unsigned short size_type; + + // template void fill_n(iterator_type, size_type, const value_type&); + template iterator_type fill_n(iterator_type, size_type, const value_type&); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/equal/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/equal/requirements/explicit_instantiation/pod.cc new file mode 100644 index 000000000000..bbadf7e9a32a --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/equal/requirements/explicit_instantiation/pod.cc @@ -0,0 +1,45 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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 unsigned short size_type; + + // template void fill_n(iterator_type, size_type, const value_type&); + template iterator_type fill_n(iterator_type, size_type, const value_type&); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/equal_range/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/equal_range/requirements/explicit_instantiation/2.cc new file mode 100644 index 000000000000..756891bc947c --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/equal_range/requirements/explicit_instantiation/2.cc @@ -0,0 +1,50 @@ + +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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::NonDefaultConstructible; + + typedef NonDefaultConstructible value_type; + typedef value_type* iterator_type; + typedef std::pair pair_type; + typedef std::less compare_type; + + template pair_type equal_range(iterator_type, iterator_type, + const value_type&); + + template pair_type equal_range(iterator_type, iterator_type, + const value_type&, compare_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/equal_range/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/equal_range/requirements/explicit_instantiation/pod.cc new file mode 100644 index 000000000000..709b31256692 --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/equal_range/requirements/explicit_instantiation/pod.cc @@ -0,0 +1,50 @@ + +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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::pair pair_type; + typedef std::less compare_type; + + template pair_type equal_range(iterator_type, iterator_type, + const value_type&); + + template pair_type equal_range(iterator_type, iterator_type, + const value_type&, compare_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/fill/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/fill/requirements/explicit_instantiation/2.cc new file mode 100644 index 000000000000..4b5b87256801 --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/fill/requirements/explicit_instantiation/2.cc @@ -0,0 +1,43 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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::NonDefaultConstructible; + + typedef NonDefaultConstructible value_type; + typedef value_type* iterator_type; + + template void fill(iterator_type, iterator_type, const value_type&); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/fill/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/fill/requirements/explicit_instantiation/pod.cc new file mode 100644 index 000000000000..c3650b94354d --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/fill/requirements/explicit_instantiation/pod.cc @@ -0,0 +1,43 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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; + + template void fill(iterator_type, iterator_type, const value_type&); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/fill_n/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/fill_n/requirements/explicit_instantiation/2.cc new file mode 100644 index 000000000000..ec35b44d69d1 --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/fill_n/requirements/explicit_instantiation/2.cc @@ -0,0 +1,45 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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::NonDefaultConstructible; + + typedef NonDefaultConstructible value_type; + typedef value_type* iterator_type; + typedef unsigned short size_type; + + // template void fill_n(iterator_type, size_type, const value_type&); + template iterator_type fill_n(iterator_type, size_type, const value_type&); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/fill_n/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/fill_n/requirements/explicit_instantiation/pod.cc new file mode 100644 index 000000000000..bbadf7e9a32a --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/fill_n/requirements/explicit_instantiation/pod.cc @@ -0,0 +1,45 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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 unsigned short size_type; + + // template void fill_n(iterator_type, size_type, const value_type&); + template iterator_type fill_n(iterator_type, size_type, const value_type&); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/find/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/find/requirements/explicit_instantiation/2.cc new file mode 100644 index 000000000000..b7d7e65645fe --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/find/requirements/explicit_instantiation/2.cc @@ -0,0 +1,43 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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::NonDefaultConstructible; + + typedef NonDefaultConstructible value_type; + typedef value_type* iterator_type; + + template iterator_type find(iterator_type, iterator_type, const value_type&); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/find/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/find/requirements/explicit_instantiation/pod.cc new file mode 100644 index 000000000000..07d8069efdc9 --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/find/requirements/explicit_instantiation/pod.cc @@ -0,0 +1,43 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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; + + template iterator_type find(iterator_type, iterator_type, const value_type&); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/find_end/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/find_end/requirements/explicit_instantiation/2.cc new file mode 100644 index 000000000000..d0b481894c74 --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/find_end/requirements/explicit_instantiation/2.cc @@ -0,0 +1,49 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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::NonDefaultConstructible; + + typedef NonDefaultConstructible value_type; + typedef value_type* iterator_type; + typedef std::pointer_to_binary_function predicate_type; + + template iterator_type find_end(iterator_type, iterator_type, + iterator_type, iterator_type); + + template iterator_type find_end(iterator_type, iterator_type, + iterator_type, iterator_type, + predicate_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/find_end/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/find_end/requirements/explicit_instantiation/pod.cc new file mode 100644 index 000000000000..ed7ea1760afd --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/find_end/requirements/explicit_instantiation/pod.cc @@ -0,0 +1,49 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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::pointer_to_binary_function predicate_type; + + template iterator_type find_end(iterator_type, iterator_type, + iterator_type, iterator_type); + + template iterator_type find_end(iterator_type, iterator_type, + iterator_type, iterator_type, + predicate_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/find_first_of/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/find_first_of/requirements/explicit_instantiation/2.cc new file mode 100644 index 000000000000..8fb55e7d7932 --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/find_first_of/requirements/explicit_instantiation/2.cc @@ -0,0 +1,49 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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::NonDefaultConstructible; + + typedef NonDefaultConstructible value_type; + typedef value_type* iterator_type; + typedef std::pointer_to_binary_function predicate_type; + + template iterator_type find_first_of(iterator_type, iterator_type, + iterator_type, iterator_type); + + template iterator_type find_first_of(iterator_type, iterator_type, + iterator_type, iterator_type, + predicate_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/find_first_of/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/find_first_of/requirements/explicit_instantiation/pod.cc new file mode 100644 index 000000000000..bdaaeff14709 --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/find_first_of/requirements/explicit_instantiation/pod.cc @@ -0,0 +1,49 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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::pointer_to_binary_function predicate_type; + + template iterator_type find_first_of(iterator_type, iterator_type, + iterator_type, iterator_type); + + template iterator_type find_first_of(iterator_type, iterator_type, + iterator_type, iterator_type, + predicate_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/find_if/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/find_if/requirements/explicit_instantiation/2.cc new file mode 100644 index 000000000000..f2cf218f6c68 --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/find_if/requirements/explicit_instantiation/2.cc @@ -0,0 +1,44 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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::NonDefaultConstructible; + + typedef NonDefaultConstructible value_type; + typedef value_type* iterator_type; + typedef std::pointer_to_unary_function predicate_type; + + template iterator_type find_if(iterator_type, iterator_type, predicate_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/find_if/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/find_if/requirements/explicit_instantiation/pod.cc new file mode 100644 index 000000000000..ed4aa30707d3 --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/find_if/requirements/explicit_instantiation/pod.cc @@ -0,0 +1,44 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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::pointer_to_unary_function predicate_type; + + template iterator_type find_if(iterator_type, iterator_type, predicate_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/for_each/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/for_each/requirements/explicit_instantiation/2.cc new file mode 100644 index 000000000000..456b2b4e060f --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/for_each/requirements/explicit_instantiation/2.cc @@ -0,0 +1,45 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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::NonDefaultConstructible; + + typedef NonDefaultConstructible value_type; + typedef value_type* iterator_type; + typedef std::pointer_to_unary_function function_type; + + template function_type for_each(iterator_type, iterator_type, + function_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/for_each/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/for_each/requirements/explicit_instantiation/pod.cc new file mode 100644 index 000000000000..b38dc0bca83a --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/for_each/requirements/explicit_instantiation/pod.cc @@ -0,0 +1,45 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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::pointer_to_unary_function function_type; + + template function_type for_each(iterator_type, iterator_type, + function_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/generate/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/generate/requirements/explicit_instantiation/2.cc new file mode 100644 index 000000000000..0fb3707f139a --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/generate/requirements/explicit_instantiation/2.cc @@ -0,0 +1,46 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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; + using __gnu_test::void_function; + + typedef NonDefaultConstructible value_type; + typedef value_type* iterator_type; + typedef void_function generator_type; + + template void generate(iterator_type, iterator_type, generator_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/generate/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/generate/requirements/explicit_instantiation/pod.cc new file mode 100644 index 000000000000..62d2a511c268 --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/generate/requirements/explicit_instantiation/pod.cc @@ -0,0 +1,46 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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::pod_int; + using __gnu_test::void_function; + + typedef pod_int value_type; + typedef value_type* iterator_type; + typedef void_function generator_type; + + template void generate(iterator_type, iterator_type, generator_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/generate_n/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/generate_n/requirements/explicit_instantiation/2.cc new file mode 100644 index 000000000000..2cc64b72fdd2 --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/generate_n/requirements/explicit_instantiation/2.cc @@ -0,0 +1,47 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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; + using __gnu_test::void_function; + + typedef NonDefaultConstructible value_type; + typedef value_type* iterator_type; + typedef unsigned short size_type; + typedef void_function generator_type; + + template iterator_type generate_n(iterator_type, size_type, generator_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/generate_n/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/generate_n/requirements/explicit_instantiation/pod.cc new file mode 100644 index 000000000000..b8da1e9306a5 --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/generate_n/requirements/explicit_instantiation/pod.cc @@ -0,0 +1,47 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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::pod_int; + using __gnu_test::void_function; + + typedef pod_int value_type; + typedef value_type* iterator_type; + typedef unsigned short size_type; + typedef void_function generator_type; + + template iterator_type generate_n(iterator_type, size_type, generator_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/includes/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/includes/requirements/explicit_instantiation/2.cc new file mode 100644 index 000000000000..63f6d95d23a7 --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/includes/requirements/explicit_instantiation/2.cc @@ -0,0 +1,48 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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::NonDefaultConstructible; + + typedef NonDefaultConstructible value_type; + typedef value_type* iterator_type; + typedef std::less compare_type; + + template bool includes(iterator_type, iterator_type, iterator_type, + iterator_type); + + template bool includes(iterator_type, iterator_type, iterator_type, + iterator_type, compare_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/includes/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/includes/requirements/explicit_instantiation/pod.cc new file mode 100644 index 000000000000..1319637850e6 --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/includes/requirements/explicit_instantiation/pod.cc @@ -0,0 +1,48 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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 includes(iterator_type, iterator_type, iterator_type, + iterator_type); + + template bool includes(iterator_type, iterator_type, iterator_type, + iterator_type, compare_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/inplace_merge/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/inplace_merge/requirements/explicit_instantiation/2.cc new file mode 100644 index 000000000000..10656a9c0299 --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/inplace_merge/requirements/explicit_instantiation/2.cc @@ -0,0 +1,47 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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::NonDefaultConstructible; + + typedef NonDefaultConstructible value_type; + typedef value_type* iterator_type; + typedef std::less compare_type; + + template void inplace_merge(iterator_type, iterator_type, iterator_type); + + template void inplace_merge(iterator_type, iterator_type, + iterator_type, compare_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/inplace_merge/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/inplace_merge/requirements/explicit_instantiation/pod.cc new file mode 100644 index 000000000000..305f448ae22c --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/inplace_merge/requirements/explicit_instantiation/pod.cc @@ -0,0 +1,47 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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 void inplace_merge(iterator_type, iterator_type, iterator_type); + + template void inplace_merge(iterator_type, iterator_type, + iterator_type, compare_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/iter_swap/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/iter_swap/requirements/explicit_instantiation/2.cc new file mode 100644 index 000000000000..9f8f9829e548 --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/iter_swap/requirements/explicit_instantiation/2.cc @@ -0,0 +1,43 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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::NonDefaultConstructible; + + typedef NonDefaultConstructible value_type; + typedef value_type* iterator_type; + + template void iter_swap(iterator_type, iterator_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/iter_swap/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/iter_swap/requirements/explicit_instantiation/pod.cc new file mode 100644 index 000000000000..070df5142ab9 --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/iter_swap/requirements/explicit_instantiation/pod.cc @@ -0,0 +1,43 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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; + + template void iter_swap(iterator_type, iterator_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/lexicographical_compare/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/lexicographical_compare/requirements/explicit_instantiation/2.cc new file mode 100644 index 000000000000..8a868ecb08bb --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/lexicographical_compare/requirements/explicit_instantiation/2.cc @@ -0,0 +1,49 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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::NonDefaultConstructible; + + typedef NonDefaultConstructible value_type; + typedef value_type* iterator_type; + typedef std::less compare_type; + + template bool lexicographical_compare(iterator_type, iterator_type, + iterator_type, iterator_type); + + template bool lexicographical_compare(iterator_type, iterator_type, + iterator_type, iterator_type, + compare_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/lexicographical_compare/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/lexicographical_compare/requirements/explicit_instantiation/pod.cc new file mode 100644 index 000000000000..69598b807fed --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/lexicographical_compare/requirements/explicit_instantiation/pod.cc @@ -0,0 +1,49 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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 lexicographical_compare(iterator_type, iterator_type, + iterator_type, iterator_type); + + template bool lexicographical_compare(iterator_type, iterator_type, + iterator_type, iterator_type, + compare_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/lower_bound/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/lower_bound/requirements/explicit_instantiation/2.cc new file mode 100644 index 000000000000..b7b62bd94b2e --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/lower_bound/requirements/explicit_instantiation/2.cc @@ -0,0 +1,48 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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::NonDefaultConstructible; + + typedef NonDefaultConstructible value_type; + typedef value_type* iterator_type; + typedef std::less compare_type; + + template iterator_type lower_bound(iterator_type, iterator_type, + const value_type&); + + template iterator_type lower_bound(iterator_type, iterator_type, + const value_type&, compare_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/lower_bound/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/lower_bound/requirements/explicit_instantiation/pod.cc new file mode 100644 index 000000000000..a3b680727400 --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/lower_bound/requirements/explicit_instantiation/pod.cc @@ -0,0 +1,48 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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 lower_bound(iterator_type, iterator_type, + const value_type&); + + template iterator_type lower_bound(iterator_type, iterator_type, + const value_type&, compare_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/make_heap/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/make_heap/requirements/explicit_instantiation/2.cc new file mode 100644 index 000000000000..fa77fc5855cd --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/make_heap/requirements/explicit_instantiation/2.cc @@ -0,0 +1,45 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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::NonDefaultConstructible; + + typedef NonDefaultConstructible value_type; + typedef value_type* iterator_type; + typedef std::less compare_type; + + template void make_heap(iterator_type, iterator_type); + template void make_heap(iterator_type, iterator_type, compare_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/make_heap/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/make_heap/requirements/explicit_instantiation/pod.cc new file mode 100644 index 000000000000..db682dee28ee --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/make_heap/requirements/explicit_instantiation/pod.cc @@ -0,0 +1,45 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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 void make_heap(iterator_type, iterator_type); + template void make_heap(iterator_type, iterator_type, compare_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/max/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/max/requirements/explicit_instantiation/2.cc new file mode 100644 index 000000000000..5987e95282a3 --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/max/requirements/explicit_instantiation/2.cc @@ -0,0 +1,47 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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::NonDefaultConstructible; + + typedef NonDefaultConstructible value_type; + typedef value_type* iterator_type; + typedef std::less compare_type; + + template const value_type& max(const value_type&, const value_type&); + + template const value_type& max(const value_type&, const value_type&, + compare_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/max/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/max/requirements/explicit_instantiation/pod.cc new file mode 100644 index 000000000000..60b39b97cd63 --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/max/requirements/explicit_instantiation/pod.cc @@ -0,0 +1,47 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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 const value_type& max(const value_type&, const value_type&); + + template const value_type& max(const value_type&, const value_type&, + compare_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/max_element/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/max_element/requirements/explicit_instantiation/2.cc new file mode 100644 index 000000000000..c8bce1658cbb --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/max_element/requirements/explicit_instantiation/2.cc @@ -0,0 +1,47 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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::NonDefaultConstructible; + + typedef NonDefaultConstructible value_type; + typedef value_type* iterator_type; + typedef std::less compare_type; + + template iterator_type max_element(iterator_type, iterator_type); + + template iterator_type max_element(iterator_type, iterator_type, + compare_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/max_element/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/max_element/requirements/explicit_instantiation/pod.cc new file mode 100644 index 000000000000..75a7d481d653 --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/max_element/requirements/explicit_instantiation/pod.cc @@ -0,0 +1,47 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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 max_element(iterator_type, iterator_type); + + template iterator_type max_element(iterator_type, iterator_type, + compare_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/merge/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/merge/requirements/explicit_instantiation/2.cc new file mode 100644 index 000000000000..3d7c46ad70de --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/merge/requirements/explicit_instantiation/2.cc @@ -0,0 +1,48 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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::NonDefaultConstructible; + + typedef NonDefaultConstructible value_type; + typedef value_type* iterator_type; + typedef std::less compare_type; + + template iterator_type merge(iterator_type, iterator_type, + iterator_type, iterator_type, iterator_type); + + template iterator_type merge(iterator_type, iterator_type, iterator_type, + iterator_type, iterator_type, compare_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/merge/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/merge/requirements/explicit_instantiation/pod.cc new file mode 100644 index 000000000000..4338cf1acd95 --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/merge/requirements/explicit_instantiation/pod.cc @@ -0,0 +1,48 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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 merge(iterator_type, iterator_type, + iterator_type, iterator_type, iterator_type); + + template iterator_type merge(iterator_type, iterator_type, iterator_type, + iterator_type, iterator_type, compare_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/min/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/min/requirements/explicit_instantiation/2.cc new file mode 100644 index 000000000000..03d0726229c8 --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/min/requirements/explicit_instantiation/2.cc @@ -0,0 +1,46 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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::NonDefaultConstructible; + + typedef NonDefaultConstructible value_type; + typedef value_type* iterator_type; + typedef std::less compare_type; + + template const value_type& min(const value_type&, const value_type&); + template const value_type& min(const value_type&, const value_type&, + compare_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/min/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/min/requirements/explicit_instantiation/pod.cc new file mode 100644 index 000000000000..1f5b1f07747d --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/min/requirements/explicit_instantiation/pod.cc @@ -0,0 +1,46 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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 const value_type& min(const value_type&, const value_type&); + template const value_type& min(const value_type&, const value_type&, + compare_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/min_element/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/min_element/requirements/explicit_instantiation/2.cc new file mode 100644 index 000000000000..5ab09b5448a5 --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/min_element/requirements/explicit_instantiation/2.cc @@ -0,0 +1,47 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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::NonDefaultConstructible; + + typedef NonDefaultConstructible value_type; + typedef value_type* iterator_type; + typedef std::less compare_type; + + template iterator_type min_element(iterator_type, iterator_type); + + template iterator_type min_element(iterator_type, iterator_type, + compare_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/min_element/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/min_element/requirements/explicit_instantiation/pod.cc new file mode 100644 index 000000000000..cab39f13c29e --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/min_element/requirements/explicit_instantiation/pod.cc @@ -0,0 +1,47 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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 min_element(iterator_type, iterator_type); + + template iterator_type min_element(iterator_type, iterator_type, + compare_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/next_permutation/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/next_permutation/requirements/explicit_instantiation/2.cc new file mode 100644 index 000000000000..c89eba09f087 --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/next_permutation/requirements/explicit_instantiation/2.cc @@ -0,0 +1,45 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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::NonDefaultConstructible; + + typedef NonDefaultConstructible value_type; + typedef value_type* iterator_type; + typedef std::less compare_type; + + template bool next_permutation(iterator_type, iterator_type); + template bool next_permutation(iterator_type, iterator_type, compare_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/next_permutation/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/next_permutation/requirements/explicit_instantiation/pod.cc new file mode 100644 index 000000000000..f46999a1bfc5 --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/next_permutation/requirements/explicit_instantiation/pod.cc @@ -0,0 +1,45 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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 next_permutation(iterator_type, iterator_type); + template bool next_permutation(iterator_type, iterator_type, compare_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/nth_element/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/nth_element/requirements/explicit_instantiation/2.cc new file mode 100644 index 000000000000..0d5a7efa12af --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/nth_element/requirements/explicit_instantiation/2.cc @@ -0,0 +1,46 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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::NonDefaultConstructible; + + typedef NonDefaultConstructible value_type; + typedef value_type* iterator_type; + typedef std::less compare_type; + + template void nth_element(iterator_type, iterator_type, iterator_type); + template void nth_element(iterator_type, iterator_type, iterator_type, + compare_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/nth_element/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/nth_element/requirements/explicit_instantiation/pod.cc new file mode 100644 index 000000000000..5a98b8936fea --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/nth_element/requirements/explicit_instantiation/pod.cc @@ -0,0 +1,46 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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 void nth_element(iterator_type, iterator_type, iterator_type); + template void nth_element(iterator_type, iterator_type, iterator_type, + compare_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/partial_sort/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/partial_sort/requirements/explicit_instantiation/2.cc new file mode 100644 index 000000000000..f2f3f7eec295 --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/partial_sort/requirements/explicit_instantiation/2.cc @@ -0,0 +1,46 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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::NonDefaultConstructible; + + typedef NonDefaultConstructible value_type; + typedef value_type* iterator_type; + typedef std::less compare_type; + + template void partial_sort(iterator_type, iterator_type, iterator_type); + template void partial_sort(iterator_type, iterator_type, iterator_type, + compare_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/partial_sort/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/partial_sort/requirements/explicit_instantiation/pod.cc new file mode 100644 index 000000000000..fbc92766f2a6 --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/partial_sort/requirements/explicit_instantiation/pod.cc @@ -0,0 +1,46 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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 void partial_sort(iterator_type, iterator_type, iterator_type); + template void partial_sort(iterator_type, iterator_type, iterator_type, + compare_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/partial_sort_copy/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/partial_sort_copy/requirements/explicit_instantiation/2.cc new file mode 100644 index 000000000000..8a962ff5482c --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/partial_sort_copy/requirements/explicit_instantiation/2.cc @@ -0,0 +1,49 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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::NonDefaultConstructible; + + typedef NonDefaultConstructible value_type; + typedef value_type* iterator_type; + typedef std::less compare_type; + + template iterator_type partial_sort_copy(iterator_type, iterator_type, + iterator_type, iterator_type); + + template iterator_type partial_sort_copy(iterator_type, iterator_type, + iterator_type, iterator_type, + compare_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/partial_sort_copy/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/partial_sort_copy/requirements/explicit_instantiation/pod.cc new file mode 100644 index 000000000000..d8d45093f051 --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/partial_sort_copy/requirements/explicit_instantiation/pod.cc @@ -0,0 +1,49 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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 partial_sort_copy(iterator_type, iterator_type, + iterator_type, iterator_type); + + template iterator_type partial_sort_copy(iterator_type, iterator_type, + iterator_type, iterator_type, + compare_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/partition/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/partition/requirements/explicit_instantiation/2.cc new file mode 100644 index 000000000000..231411d5129b --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/partition/requirements/explicit_instantiation/2.cc @@ -0,0 +1,45 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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::NonDefaultConstructible; + + typedef NonDefaultConstructible value_type; + typedef value_type* iterator_type; + typedef std::pointer_to_unary_function predicate_type; + + template iterator_type partition(iterator_type, iterator_type, + predicate_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/partition/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/partition/requirements/explicit_instantiation/pod.cc new file mode 100644 index 000000000000..e07c763e3185 --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/partition/requirements/explicit_instantiation/pod.cc @@ -0,0 +1,45 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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::pointer_to_unary_function predicate_type; + + template iterator_type partition(iterator_type, iterator_type, + predicate_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/pop_heap/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/pop_heap/requirements/explicit_instantiation/2.cc new file mode 100644 index 000000000000..06a7d0dcb40c --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/pop_heap/requirements/explicit_instantiation/2.cc @@ -0,0 +1,44 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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::NonDefaultConstructible; + + typedef NonDefaultConstructible value_type; + typedef value_type* iterator_type; + typedef std::less compare_type; + + template void pop_heap(iterator_type, iterator_type, compare_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/pop_heap/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/pop_heap/requirements/explicit_instantiation/pod.cc new file mode 100644 index 000000000000..28ca9f3cfe85 --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/pop_heap/requirements/explicit_instantiation/pod.cc @@ -0,0 +1,44 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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 void pop_heap(iterator_type, iterator_type, compare_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/prev_permutation/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/prev_permutation/requirements/explicit_instantiation/2.cc new file mode 100644 index 000000000000..6a8886186421 --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/prev_permutation/requirements/explicit_instantiation/2.cc @@ -0,0 +1,45 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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::NonDefaultConstructible; + + typedef NonDefaultConstructible value_type; + typedef value_type* iterator_type; + typedef std::less compare_type; + + template bool prev_permutation(iterator_type, iterator_type); + template bool prev_permutation(iterator_type, iterator_type, compare_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/prev_permutation/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/prev_permutation/requirements/explicit_instantiation/pod.cc new file mode 100644 index 000000000000..6f0dcec2e10a --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/prev_permutation/requirements/explicit_instantiation/pod.cc @@ -0,0 +1,45 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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 prev_permutation(iterator_type, iterator_type); + template bool prev_permutation(iterator_type, iterator_type, compare_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/push_heap/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/push_heap/requirements/explicit_instantiation/2.cc new file mode 100644 index 000000000000..5e6004233043 --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/push_heap/requirements/explicit_instantiation/2.cc @@ -0,0 +1,45 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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::NonDefaultConstructible; + + typedef NonDefaultConstructible value_type; + typedef value_type* iterator_type; + typedef std::less compare_type; + + template void push_heap(iterator_type, iterator_type); + template void push_heap(iterator_type, iterator_type, compare_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/push_heap/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/push_heap/requirements/explicit_instantiation/pod.cc new file mode 100644 index 000000000000..2dbec8c4216c --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/push_heap/requirements/explicit_instantiation/pod.cc @@ -0,0 +1,45 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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 void push_heap(iterator_type, iterator_type); + template void push_heap(iterator_type, iterator_type, compare_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/random_shuffle/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/random_shuffle/requirements/explicit_instantiation/2.cc new file mode 100644 index 000000000000..ad1faf620ccf --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/random_shuffle/requirements/explicit_instantiation/2.cc @@ -0,0 +1,46 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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::NonDefaultConstructible; + + typedef NonDefaultConstructible value_type; + typedef value_type* iterator_type; + typedef std::pointer_to_unary_function generator_type; + + template void random_shuffle(iterator_type, iterator_type); + template void random_shuffle(iterator_type, iterator_type, + generator_type&); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/random_shuffle/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/random_shuffle/requirements/explicit_instantiation/pod.cc new file mode 100644 index 000000000000..f49204456cd4 --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/random_shuffle/requirements/explicit_instantiation/pod.cc @@ -0,0 +1,46 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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::pointer_to_unary_function generator_type; + + template void random_shuffle(iterator_type, iterator_type); + template void random_shuffle(iterator_type, iterator_type, + generator_type&); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/remove/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/remove/requirements/explicit_instantiation/2.cc new file mode 100644 index 000000000000..b6e4a04ee67e --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/remove/requirements/explicit_instantiation/2.cc @@ -0,0 +1,44 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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::NonDefaultConstructible; + + typedef NonDefaultConstructible value_type; + typedef value_type* iterator_type; + + template iterator_type remove(iterator_type, iterator_type, + const value_type&); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/remove/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/remove/requirements/explicit_instantiation/pod.cc new file mode 100644 index 000000000000..1bc1bcc4b778 --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/remove/requirements/explicit_instantiation/pod.cc @@ -0,0 +1,44 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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; + + template iterator_type remove(iterator_type, iterator_type, + const value_type&); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/remove_copy/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/remove_copy/requirements/explicit_instantiation/2.cc new file mode 100644 index 000000000000..214c80dfa92a --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/remove_copy/requirements/explicit_instantiation/2.cc @@ -0,0 +1,44 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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::NonDefaultConstructible; + + typedef NonDefaultConstructible value_type; + typedef value_type* iterator_type; + + template iterator_type remove_copy(iterator_type, iterator_type, + iterator_type, const value_type&); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/remove_copy/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/remove_copy/requirements/explicit_instantiation/pod.cc new file mode 100644 index 000000000000..bd060dab0f57 --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/remove_copy/requirements/explicit_instantiation/pod.cc @@ -0,0 +1,44 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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; + + template iterator_type remove_copy(iterator_type, iterator_type, + iterator_type, const value_type&); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/remove_copy_if/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/remove_copy_if/requirements/explicit_instantiation/2.cc new file mode 100644 index 000000000000..4ac704793d2a --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/remove_copy_if/requirements/explicit_instantiation/2.cc @@ -0,0 +1,45 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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::NonDefaultConstructible; + + typedef NonDefaultConstructible value_type; + typedef value_type* iterator_type; + typedef std::pointer_to_unary_function predicate_type; + + template iterator_type remove_copy_if(iterator_type, iterator_type, + iterator_type, predicate_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/remove_copy_if/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/remove_copy_if/requirements/explicit_instantiation/pod.cc new file mode 100644 index 000000000000..5bf77c72e13a --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/remove_copy_if/requirements/explicit_instantiation/pod.cc @@ -0,0 +1,45 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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::pointer_to_unary_function predicate_type; + + template iterator_type remove_copy_if(iterator_type, iterator_type, + iterator_type, predicate_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/remove_if/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/remove_if/requirements/explicit_instantiation/2.cc new file mode 100644 index 000000000000..56e0375d124b --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/remove_if/requirements/explicit_instantiation/2.cc @@ -0,0 +1,45 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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::NonDefaultConstructible; + + typedef NonDefaultConstructible value_type; + typedef value_type* iterator_type; + typedef std::pointer_to_unary_function predicate_type; + + template iterator_type remove_if(iterator_type, iterator_type, + predicate_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/remove_if/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/remove_if/requirements/explicit_instantiation/pod.cc new file mode 100644 index 000000000000..61c08fe89b48 --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/remove_if/requirements/explicit_instantiation/pod.cc @@ -0,0 +1,45 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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::pointer_to_unary_function predicate_type; + + template iterator_type remove_if(iterator_type, iterator_type, + predicate_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/replace/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/replace/requirements/explicit_instantiation/2.cc new file mode 100644 index 000000000000..834211ee7e96 --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/replace/requirements/explicit_instantiation/2.cc @@ -0,0 +1,44 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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::NonDefaultConstructible; + + typedef NonDefaultConstructible value_type; + typedef value_type* iterator_type; + + template void replace(iterator_type, iterator_type, const value_type&, + const value_type&); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/replace/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/replace/requirements/explicit_instantiation/pod.cc new file mode 100644 index 000000000000..15c4f4ab1a42 --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/replace/requirements/explicit_instantiation/pod.cc @@ -0,0 +1,44 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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; + + template void replace(iterator_type, iterator_type, const value_type&, + const value_type&); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/replace_copy/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/replace_copy/requirements/explicit_instantiation/2.cc new file mode 100644 index 000000000000..8a8ef3dc1857 --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/replace_copy/requirements/explicit_instantiation/2.cc @@ -0,0 +1,45 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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::NonDefaultConstructible; + + typedef NonDefaultConstructible value_type; + typedef value_type* iterator_type; + + template iterator_type replace_copy(iterator_type, iterator_type, + iterator_type, const value_type&, + const value_type&); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/replace_copy/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/replace_copy/requirements/explicit_instantiation/pod.cc new file mode 100644 index 000000000000..869659c095d8 --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/replace_copy/requirements/explicit_instantiation/pod.cc @@ -0,0 +1,45 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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; + + template iterator_type replace_copy(iterator_type, iterator_type, + iterator_type, const value_type&, + const value_type&); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/replace_copy_if/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/replace_copy_if/requirements/explicit_instantiation/2.cc new file mode 100644 index 000000000000..d84cb1347890 --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/replace_copy_if/requirements/explicit_instantiation/2.cc @@ -0,0 +1,46 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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::NonDefaultConstructible; + + typedef NonDefaultConstructible value_type; + typedef value_type* iterator_type; + typedef std::pointer_to_unary_function predicate_type; + + template iterator_type replace_copy_if(iterator_type, iterator_type, + iterator_type, predicate_type, + const value_type&); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/replace_copy_if/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/replace_copy_if/requirements/explicit_instantiation/pod.cc new file mode 100644 index 000000000000..6cb64619e3bf --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/replace_copy_if/requirements/explicit_instantiation/pod.cc @@ -0,0 +1,46 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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::pointer_to_unary_function predicate_type; + + template iterator_type replace_copy_if(iterator_type, iterator_type, + iterator_type, predicate_type, + const value_type&); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/replace_if/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/replace_if/requirements/explicit_instantiation/2.cc new file mode 100644 index 000000000000..692caf318c9c --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/replace_if/requirements/explicit_instantiation/2.cc @@ -0,0 +1,45 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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::NonDefaultConstructible; + + typedef NonDefaultConstructible value_type; + typedef value_type* iterator_type; + typedef std::pointer_to_unary_function predicate_type; + + template void replace_if(iterator_type, iterator_type, predicate_type, + const value_type&); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/replace_if/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/replace_if/requirements/explicit_instantiation/pod.cc new file mode 100644 index 000000000000..7e95210e222b --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/replace_if/requirements/explicit_instantiation/pod.cc @@ -0,0 +1,45 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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::pointer_to_unary_function predicate_type; + + template void replace_if(iterator_type, iterator_type, predicate_type, + const value_type&); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/reverse/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/reverse/requirements/explicit_instantiation/2.cc new file mode 100644 index 000000000000..8f774a81366b --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/reverse/requirements/explicit_instantiation/2.cc @@ -0,0 +1,43 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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::NonDefaultConstructible; + + typedef NonDefaultConstructible value_type; + typedef value_type* iterator_type; + + template void reverse(iterator_type, iterator_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/reverse/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/reverse/requirements/explicit_instantiation/pod.cc new file mode 100644 index 000000000000..94b6eadde244 --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/reverse/requirements/explicit_instantiation/pod.cc @@ -0,0 +1,43 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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; + + template void reverse(iterator_type, iterator_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/reverse_copy/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/reverse_copy/explicit_instantiation/2.cc new file mode 100644 index 000000000000..0b88c90bdbe5 --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/reverse_copy/explicit_instantiation/2.cc @@ -0,0 +1,44 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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::NonDefaultConstructible; + + typedef NonDefaultConstructible value_type; + typedef value_type* iterator_type; + + template iterator_type reverse_copy(iterator_type, iterator_type, + iterator_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/reverse_copy/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/reverse_copy/explicit_instantiation/pod.cc new file mode 100644 index 000000000000..5887ca93a21e --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/reverse_copy/explicit_instantiation/pod.cc @@ -0,0 +1,44 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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; + + template iterator_type reverse_copy(iterator_type, iterator_type, + iterator_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/rotate/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/rotate/requirements/explicit_instantiation/2.cc new file mode 100644 index 000000000000..ef94a5a905ba --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/rotate/requirements/explicit_instantiation/2.cc @@ -0,0 +1,43 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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::NonDefaultConstructible; + + typedef NonDefaultConstructible value_type; + typedef value_type* iterator_type; + + template void rotate(iterator_type, iterator_type, iterator_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/rotate/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/rotate/requirements/explicit_instantiation/pod.cc new file mode 100644 index 000000000000..2994f93b5657 --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/rotate/requirements/explicit_instantiation/pod.cc @@ -0,0 +1,43 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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; + + template void rotate(iterator_type, iterator_type, iterator_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/rotate_copy/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/rotate_copy/requirements/explicit_instantiation/2.cc new file mode 100644 index 000000000000..716b52b5db95 --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/rotate_copy/requirements/explicit_instantiation/2.cc @@ -0,0 +1,44 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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::NonDefaultConstructible; + + typedef NonDefaultConstructible value_type; + typedef value_type* iterator_type; + + template iterator_type rotate_copy(iterator_type, iterator_type, + iterator_type, iterator_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/rotate_copy/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/rotate_copy/requirements/explicit_instantiation/pod.cc new file mode 100644 index 000000000000..2d73426fe63b --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/rotate_copy/requirements/explicit_instantiation/pod.cc @@ -0,0 +1,44 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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; + + template iterator_type rotate_copy(iterator_type, iterator_type, + iterator_type, iterator_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/search/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/search/requirements/explicit_instantiation/2.cc new file mode 100644 index 000000000000..2f526e840f32 --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/search/requirements/explicit_instantiation/2.cc @@ -0,0 +1,48 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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::NonDefaultConstructible; + + typedef NonDefaultConstructible value_type; + typedef value_type* iterator_type; + typedef std::pointer_to_binary_function predicate_type; + + template iterator_type search(iterator_type, iterator_type, + iterator_type, iterator_type); + + template iterator_type search(iterator_type, iterator_type, + iterator_type, iterator_type, predicate_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/search/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/search/requirements/explicit_instantiation/pod.cc new file mode 100644 index 000000000000..431cfc1fec92 --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/search/requirements/explicit_instantiation/pod.cc @@ -0,0 +1,48 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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::pointer_to_binary_function predicate_type; + + template iterator_type search(iterator_type, iterator_type, + iterator_type, iterator_type); + + template iterator_type search(iterator_type, iterator_type, + iterator_type, iterator_type, predicate_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/search_n/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/search_n/requirements/explicit_instantiation/2.cc new file mode 100644 index 000000000000..1338df98edaa --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/search_n/requirements/explicit_instantiation/2.cc @@ -0,0 +1,49 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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::NonDefaultConstructible; + + typedef NonDefaultConstructible value_type; + typedef value_type* iterator_type; + typedef std::size_t size_type; + typedef std::pointer_to_binary_function predicate_type; + + template iterator_type search_n(iterator_type, iterator_type, + size_type, const value_type&); + + template iterator_type search_n(iterator_type, iterator_type, + size_type, const value_type&, predicate_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/search_n/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/search_n/requirements/explicit_instantiation/pod.cc new file mode 100644 index 000000000000..93c31798a81d --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/search_n/requirements/explicit_instantiation/pod.cc @@ -0,0 +1,49 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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::size_t size_type; + typedef std::pointer_to_binary_function predicate_type; + + template iterator_type search_n(iterator_type, iterator_type, + size_type, const value_type&); + + template iterator_type search_n(iterator_type, iterator_type, + size_type, const value_type&, predicate_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/set_difference/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/set_difference/requirements/explicit_instantiation/2.cc new file mode 100644 index 000000000000..238cfbc9561c --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/set_difference/requirements/explicit_instantiation/2.cc @@ -0,0 +1,50 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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::NonDefaultConstructible; + + typedef NonDefaultConstructible value_type; + typedef value_type* iterator_type; + typedef std::less compare_type; + + template iterator_type set_difference(iterator_type, iterator_type, + iterator_type, + iterator_type, iterator_type); + + template iterator_type set_difference(iterator_type, iterator_type, + iterator_type, iterator_type, + iterator_type, compare_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/set_difference/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/set_difference/requirements/explicit_instantiation/pod.cc new file mode 100644 index 000000000000..96ee6805fcf5 --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/set_difference/requirements/explicit_instantiation/pod.cc @@ -0,0 +1,50 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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 set_difference(iterator_type, iterator_type, + iterator_type, + iterator_type, iterator_type); + + template iterator_type set_difference(iterator_type, iterator_type, + iterator_type, iterator_type, + iterator_type, compare_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/set_intersection/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/set_intersection/requirements/explicit_instantiation/2.cc new file mode 100644 index 000000000000..95cd2bcb38ca --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/set_intersection/requirements/explicit_instantiation/2.cc @@ -0,0 +1,50 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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::NonDefaultConstructible; + + typedef NonDefaultConstructible value_type; + typedef value_type* iterator_type; + typedef std::less compare_type; + + template iterator_type set_intersection(iterator_type, iterator_type, + iterator_type, + iterator_type, iterator_type); + + template iterator_type set_intersection(iterator_type, iterator_type, + iterator_type, iterator_type, + iterator_type, compare_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/set_intersection/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/set_intersection/requirements/explicit_instantiation/pod.cc new file mode 100644 index 000000000000..f877b65d9ff4 --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/set_intersection/requirements/explicit_instantiation/pod.cc @@ -0,0 +1,50 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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 set_intersection(iterator_type, iterator_type, + iterator_type, + iterator_type, iterator_type); + + template iterator_type set_intersection(iterator_type, iterator_type, + iterator_type, iterator_type, + iterator_type, compare_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/set_symmetric_difference/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/set_symmetric_difference/requirements/explicit_instantiation/2.cc new file mode 100644 index 000000000000..3df16097c711 --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/set_symmetric_difference/requirements/explicit_instantiation/2.cc @@ -0,0 +1,50 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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::NonDefaultConstructible; + + typedef NonDefaultConstructible value_type; + typedef value_type* iterator_type; + typedef std::less compare_type; + + template iterator_type set_symmetric_difference(iterator_type, iterator_type, + iterator_type, iterator_type, + iterator_type); + + template iterator_type set_symmetric_difference(iterator_type, iterator_type, + iterator_type, iterator_type, + iterator_type, compare_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/set_symmetric_difference/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/set_symmetric_difference/requirements/explicit_instantiation/pod.cc new file mode 100644 index 000000000000..c2298592d44f --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/set_symmetric_difference/requirements/explicit_instantiation/pod.cc @@ -0,0 +1,50 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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 set_symmetric_difference(iterator_type, iterator_type, + iterator_type, iterator_type, + iterator_type); + + template iterator_type set_symmetric_difference(iterator_type, iterator_type, + iterator_type, iterator_type, + iterator_type, compare_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/set_union/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/set_union/requirements/explicit_instantiation/2.cc new file mode 100644 index 000000000000..d89ddeb26a34 --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/set_union/requirements/explicit_instantiation/2.cc @@ -0,0 +1,48 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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::NonDefaultConstructible; + + typedef NonDefaultConstructible value_type; + typedef value_type* iterator_type; + typedef std::less compare_type; + + template iterator_type set_union(iterator_type, iterator_type, iterator_type, + iterator_type, iterator_type); + + template iterator_type set_union(iterator_type, iterator_type, iterator_type, + iterator_type, iterator_type, compare_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/set_union/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/set_union/requirements/explicit_instantiation/pod.cc new file mode 100644 index 000000000000..815943c35417 --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/set_union/requirements/explicit_instantiation/pod.cc @@ -0,0 +1,48 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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 set_union(iterator_type, iterator_type, iterator_type, + iterator_type, iterator_type); + + template iterator_type set_union(iterator_type, iterator_type, iterator_type, + iterator_type, iterator_type, compare_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/sort/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/sort/requirements/explicit_instantiation/2.cc new file mode 100644 index 000000000000..6142cf52ae03 --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/sort/requirements/explicit_instantiation/2.cc @@ -0,0 +1,45 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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::NonDefaultConstructible; + + typedef NonDefaultConstructible value_type; + typedef value_type* iterator_type; + typedef std::less compare_type; + + template void sort(iterator_type, iterator_type); + template void sort(iterator_type, iterator_type, compare_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/sort/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/sort/requirements/explicit_instantiation/pod.cc new file mode 100644 index 000000000000..ab354d000e83 --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/sort/requirements/explicit_instantiation/pod.cc @@ -0,0 +1,45 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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 void sort(iterator_type, iterator_type); + template void sort(iterator_type, iterator_type, compare_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/sort_heap/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/sort_heap/requirements/explicit_instantiation/2.cc new file mode 100644 index 000000000000..f8c686f0e032 --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/sort_heap/requirements/explicit_instantiation/2.cc @@ -0,0 +1,46 @@ + +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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::NonDefaultConstructible; + + typedef NonDefaultConstructible value_type; + typedef value_type* iterator_type; + typedef std::less compare_type; + + template void sort_heap(iterator_type, iterator_type); + template void sort_heap(iterator_type, iterator_type, compare_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/sort_heap/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/sort_heap/requirements/explicit_instantiation/pod.cc new file mode 100644 index 000000000000..62a1f285000d --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/sort_heap/requirements/explicit_instantiation/pod.cc @@ -0,0 +1,46 @@ + +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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 void sort_heap(iterator_type, iterator_type); + template void sort_heap(iterator_type, iterator_type, compare_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/stable_partition/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/stable_partition/requirements/explicit_instantiation/2.cc new file mode 100644 index 000000000000..2eb8dbc89497 --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/stable_partition/requirements/explicit_instantiation/2.cc @@ -0,0 +1,44 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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::NonDefaultConstructible; + + typedef NonDefaultConstructible value_type; + typedef value_type* iterator_type; + typedef std::pointer_to_unary_function predicate_type; + + template iterator_type stable_partition(iterator_type, iterator_type, predicate_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/stable_partition/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/stable_partition/requirements/explicit_instantiation/pod.cc new file mode 100644 index 000000000000..c72b74ecfdaa --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/stable_partition/requirements/explicit_instantiation/pod.cc @@ -0,0 +1,44 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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::pointer_to_unary_function predicate_type; + + template iterator_type stable_partition(iterator_type, iterator_type, predicate_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/stable_sort/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/stable_sort/requirements/explicit_instantiation/2.cc new file mode 100644 index 000000000000..f08c7b265912 --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/stable_sort/requirements/explicit_instantiation/2.cc @@ -0,0 +1,46 @@ + +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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::NonDefaultConstructible; + + typedef NonDefaultConstructible value_type; + typedef value_type* iterator_type; + typedef std::less compare_type; + + template void stable_sort(iterator_type, iterator_type); + template void stable_sort(iterator_type, iterator_type, compare_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/stable_sort/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/stable_sort/requirements/explicit_instantiation/pod.cc new file mode 100644 index 000000000000..0e79ea26c103 --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/stable_sort/requirements/explicit_instantiation/pod.cc @@ -0,0 +1,46 @@ + +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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 void stable_sort(iterator_type, iterator_type); + template void stable_sort(iterator_type, iterator_type, compare_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/swap/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/swap/requirements/explicit_instantiation/2.cc new file mode 100644 index 000000000000..1a2ae902fe3a --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/swap/requirements/explicit_instantiation/2.cc @@ -0,0 +1,43 @@ + +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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::NonDefaultConstructible; + + typedef NonDefaultConstructible value_type; + + template void swap(value_type&, value_type&); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/swap/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/swap/requirements/explicit_instantiation/pod.cc new file mode 100644 index 000000000000..6bd282bdc6f6 --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/swap/requirements/explicit_instantiation/pod.cc @@ -0,0 +1,43 @@ + +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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; + + template void swap(value_type&, value_type&); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/swap_ranges/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/swap_ranges/requirements/explicit_instantiation/2.cc new file mode 100644 index 000000000000..4ead40aeb7a9 --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/swap_ranges/requirements/explicit_instantiation/2.cc @@ -0,0 +1,44 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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::NonDefaultConstructible; + + typedef NonDefaultConstructible value_type; + typedef value_type* iterator_type; + + template iterator_type swap_ranges(iterator_type, iterator_type, + iterator_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/swap_ranges/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/swap_ranges/requirements/explicit_instantiation/pod.cc new file mode 100644 index 000000000000..f4ca2fa83275 --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/swap_ranges/requirements/explicit_instantiation/pod.cc @@ -0,0 +1,44 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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; + + template iterator_type swap_ranges(iterator_type, iterator_type, + iterator_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/transform/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/transform/requirements/explicit_instantiation/2.cc new file mode 100644 index 000000000000..0262c5c12853 --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/transform/requirements/explicit_instantiation/2.cc @@ -0,0 +1,48 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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::NonDefaultConstructible; + + typedef NonDefaultConstructible value_type; + typedef value_type* iterator_type; + typedef std::pointer_to_unary_function operator1_type; + typedef std::pointer_to_binary_function operator2_type; + + template iterator_type transform(iterator_type, iterator_type, iterator_type, + operator1_type); + template iterator_type transform(iterator_type, iterator_type, iterator_type, + iterator_type, operator2_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/transform/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/transform/requirements/explicit_instantiation/pod.cc new file mode 100644 index 000000000000..d8ec04317bf3 --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/transform/requirements/explicit_instantiation/pod.cc @@ -0,0 +1,48 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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::pointer_to_unary_function operator1_type; + typedef std::pointer_to_binary_function operator2_type; + + template iterator_type transform(iterator_type, iterator_type, iterator_type, + operator1_type); + template iterator_type transform(iterator_type, iterator_type, iterator_type, + iterator_type, operator2_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/unique/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/unique/requirements/explicit_instantiation/2.cc new file mode 100644 index 000000000000..ccc227869f19 --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/unique/requirements/explicit_instantiation/2.cc @@ -0,0 +1,45 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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::NonDefaultConstructible; + + typedef NonDefaultConstructible value_type; + typedef value_type* iterator_type; + typedef std::less predicate_type; + + template iterator_type unique(iterator_type, iterator_type); + template iterator_type unique(iterator_type, iterator_type, predicate_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/unique/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/unique/requirements/explicit_instantiation/pod.cc new file mode 100644 index 000000000000..2eb368a6a59e --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/unique/requirements/explicit_instantiation/pod.cc @@ -0,0 +1,45 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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 predicate_type; + + template iterator_type unique(iterator_type, iterator_type); + template iterator_type unique(iterator_type, iterator_type, predicate_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/unique_copy/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/unique_copy/requirements/explicit_instantiation/2.cc new file mode 100644 index 000000000000..3f45d541a084 --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/unique_copy/requirements/explicit_instantiation/2.cc @@ -0,0 +1,46 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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::NonDefaultConstructible; + + typedef NonDefaultConstructible value_type; + typedef value_type* in_iterator_type; + typedef value_type* out_iterator_type; + typedef std::less predicate_type; + + template out_iterator_type unique_copy(in_iterator_type, in_iterator_type, out_iterator_type); + template out_iterator_type unique_copy(in_iterator_type, in_iterator_type, out_iterator_type, predicate_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/unique_copy/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/unique_copy/requirements/explicit_instantiation/pod.cc new file mode 100644 index 000000000000..ef1e41ff058c --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/unique_copy/requirements/explicit_instantiation/pod.cc @@ -0,0 +1,46 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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* in_iterator_type; + typedef value_type* out_iterator_type; + typedef std::less predicate_type; + + template out_iterator_type unique_copy(in_iterator_type, in_iterator_type, out_iterator_type); + template out_iterator_type unique_copy(in_iterator_type, in_iterator_type, out_iterator_type, predicate_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/upper_bound/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/upper_bound/requirements/explicit_instantiation/2.cc new file mode 100644 index 000000000000..192962c49136 --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/upper_bound/requirements/explicit_instantiation/2.cc @@ -0,0 +1,47 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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::NonDefaultConstructible; + + typedef NonDefaultConstructible value_type; + typedef value_type* iterator_type; + typedef std::less compare_type; + + template iterator_type upper_bound(iterator_type, iterator_type, + const value_type&); + template iterator_type upper_bound(iterator_type, iterator_type, + const value_type&, compare_type); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/upper_bound/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/upper_bound/requirements/explicit_instantiation/pod.cc new file mode 100644 index 000000000000..fa1558624603 --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/upper_bound/requirements/explicit_instantiation/pod.cc @@ -0,0 +1,47 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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 upper_bound(iterator_type, iterator_type, + const value_type&); + template iterator_type upper_bound(iterator_type, iterator_type, + const value_type&, compare_type); +} diff --git a/libstdc++-v3/testsuite/26_numerics/accumulate/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/26_numerics/accumulate/requirements/explicit_instantiation/2.cc new file mode 100644 index 000000000000..58438b7d261d --- /dev/null +++ b/libstdc++-v3/testsuite/26_numerics/accumulate/requirements/explicit_instantiation/2.cc @@ -0,0 +1,41 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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 +{ + typedef __gnu_test::NonDefaultConstructible value_type; + typedef value_type* iterator_type; + + template value_type accumulate(iterator_type, iterator_type, value_type); +} diff --git a/libstdc++-v3/testsuite/26_numerics/accumulate/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/26_numerics/accumulate/requirements/explicit_instantiation/pod.cc new file mode 100644 index 000000000000..da7e0d9046e5 --- /dev/null +++ b/libstdc++-v3/testsuite/26_numerics/accumulate/requirements/explicit_instantiation/pod.cc @@ -0,0 +1,41 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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 +{ + typedef __gnu_test::pod_int value_type; + typedef value_type* iterator_type; + + template value_type accumulate(iterator_type, iterator_type, value_type); +} diff --git a/libstdc++-v3/testsuite/26_numerics/numeric_operations/sum_diff.cc b/libstdc++-v3/testsuite/26_numerics/adjacent_difference/1.cc similarity index 94% rename from libstdc++-v3/testsuite/26_numerics/numeric_operations/sum_diff.cc rename to libstdc++-v3/testsuite/26_numerics/adjacent_difference/1.cc index e5af462da01b..5501f3f9fa60 100644 --- a/libstdc++-v3/testsuite/26_numerics/numeric_operations/sum_diff.cc +++ b/libstdc++-v3/testsuite/26_numerics/adjacent_difference/1.cc @@ -36,9 +36,6 @@ test01() std::adjacent_difference(A, A + N, D); VERIFY( std::equal(D, D + N, B) ); - - std::partial_sum(D, D + N, D); - VERIFY( std::equal(D, D + N, A) ); } int diff --git a/libstdc++-v3/testsuite/26_numerics/adjacent_difference/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/26_numerics/adjacent_difference/requirements/explicit_instantiation/2.cc new file mode 100644 index 000000000000..d304e49e2574 --- /dev/null +++ b/libstdc++-v3/testsuite/26_numerics/adjacent_difference/requirements/explicit_instantiation/2.cc @@ -0,0 +1,45 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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::NonDefaultConstructible; + + typedef NonDefaultConstructible value_type; + typedef value_type* input_iterator; + typedef value_type* output_iterator; + + template + output_iterator adjacent_difference(input_iterator, input_iterator, output_iterator); +} diff --git a/libstdc++-v3/testsuite/26_numerics/adjacent_difference/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/26_numerics/adjacent_difference/requirements/explicit_instantiation/pod.cc new file mode 100644 index 000000000000..914afcda9928 --- /dev/null +++ b/libstdc++-v3/testsuite/26_numerics/adjacent_difference/requirements/explicit_instantiation/pod.cc @@ -0,0 +1,45 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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* input_iterator; + typedef value_type* output_iterator; + + template + output_iterator adjacent_difference(input_iterator, input_iterator, output_iterator); +} diff --git a/libstdc++-v3/testsuite/26_numerics/inner_product/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/26_numerics/inner_product/requirements/explicit_instantiation/2.cc new file mode 100644 index 000000000000..56e2edd55e56 --- /dev/null +++ b/libstdc++-v3/testsuite/26_numerics/inner_product/requirements/explicit_instantiation/2.cc @@ -0,0 +1,43 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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::NonDefaultConstructible; + + typedef NonDefaultConstructible value_type; + typedef value_type* iterator_type; + + template value_type inner_product(iterator_type, iterator_type, iterator_type, value_type); +} diff --git a/libstdc++-v3/testsuite/26_numerics/inner_product/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/26_numerics/inner_product/requirements/explicit_instantiation/pod.cc new file mode 100644 index 000000000000..da72492e4cdf --- /dev/null +++ b/libstdc++-v3/testsuite/26_numerics/inner_product/requirements/explicit_instantiation/pod.cc @@ -0,0 +1,43 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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; + + template value_type inner_product(iterator_type, iterator_type, iterator_type, value_type); +} diff --git a/libstdc++-v3/testsuite/26_numerics/partial_sum/1.cc b/libstdc++-v3/testsuite/26_numerics/partial_sum/1.cc new file mode 100644 index 000000000000..ac3369166566 --- /dev/null +++ b/libstdc++-v3/testsuite/26_numerics/partial_sum/1.cc @@ -0,0 +1,46 @@ +// Copyright (C) 2001, 2004 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. + +// 26.4.3 [lib.partial.sum] +// 26.4.4 [lib.adjacent.difference] + +#include +#include +#include + +int A[] = {1, 4, 9, 16, 25, 36, 49, 64, 81, 100}; +int B[] = {1, 3, 5, 7, 9, 11, 13, 15, 17, 19}; +const int N = sizeof(A) / sizeof(int); + +void +test01() +{ + bool test __attribute__((unused)) = true; + + int D[N]; + + std::partial_sum(B, B + N, D); + VERIFY( std::equal(D, D + N, A) ); +} + +int +main() +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/26_numerics/partial_sum/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/26_numerics/partial_sum/requirements/explicit_instantiation/2.cc new file mode 100644 index 000000000000..0887e17b35be --- /dev/null +++ b/libstdc++-v3/testsuite/26_numerics/partial_sum/requirements/explicit_instantiation/2.cc @@ -0,0 +1,44 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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::NonDefaultConstructible; + + typedef NonDefaultConstructible value_type; + typedef value_type* input_iterator; + typedef value_type* output_iterator; + + template output_iterator partial_sum(input_iterator, input_iterator, output_iterator); +} diff --git a/libstdc++-v3/testsuite/26_numerics/partial_sum/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/26_numerics/partial_sum/requirements/explicit_instantiation/pod.cc new file mode 100644 index 000000000000..381eb89307a3 --- /dev/null +++ b/libstdc++-v3/testsuite/26_numerics/partial_sum/requirements/explicit_instantiation/pod.cc @@ -0,0 +1,44 @@ +// { dg-do compile } + +// 2007-09-20 Benjamin Kosnik + +// 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* input_iterator; + typedef value_type* output_iterator; + + template output_iterator partial_sum(input_iterator, input_iterator, output_iterator); +} diff --git a/libstdc++-v3/testsuite/26_numerics/numeric_arrays/slice.cc b/libstdc++-v3/testsuite/26_numerics/slice/1.cc similarity index 100% rename from libstdc++-v3/testsuite/26_numerics/numeric_arrays/slice.cc rename to libstdc++-v3/testsuite/26_numerics/slice/1.cc diff --git a/libstdc++-v3/testsuite/26_numerics/numeric_arrays/slice_array/array_assignment.cc b/libstdc++-v3/testsuite/26_numerics/slice_array/array_assignment.cc similarity index 100% rename from libstdc++-v3/testsuite/26_numerics/numeric_arrays/slice_array/array_assignment.cc rename to libstdc++-v3/testsuite/26_numerics/slice_array/array_assignment.cc diff --git a/libstdc++-v3/testsuite/26_numerics/numeric_arrays/slice_array/requirements/explicit_instantiation.cc b/libstdc++-v3/testsuite/26_numerics/slice_array/requirements/explicit_instantiation.cc similarity index 100% rename from libstdc++-v3/testsuite/26_numerics/numeric_arrays/slice_array/requirements/explicit_instantiation.cc rename to libstdc++-v3/testsuite/26_numerics/slice_array/requirements/explicit_instantiation.cc diff --git a/libstdc++-v3/testsuite/26_numerics/numeric_arrays/slice_array/requirements/typedefs.cc b/libstdc++-v3/testsuite/26_numerics/slice_array/requirements/typedefs.cc similarity index 100% rename from libstdc++-v3/testsuite/26_numerics/numeric_arrays/slice_array/requirements/typedefs.cc rename to libstdc++-v3/testsuite/26_numerics/slice_array/requirements/typedefs.cc diff --git a/libstdc++-v3/testsuite/26_numerics/numeric_arrays/valarray/27867.cc b/libstdc++-v3/testsuite/26_numerics/valarray/27867.cc similarity index 100% rename from libstdc++-v3/testsuite/26_numerics/numeric_arrays/valarray/27867.cc rename to libstdc++-v3/testsuite/26_numerics/valarray/27867.cc diff --git a/libstdc++-v3/testsuite/26_numerics/numeric_arrays/valarray/28277.cc b/libstdc++-v3/testsuite/26_numerics/valarray/28277.cc similarity index 100% rename from libstdc++-v3/testsuite/26_numerics/numeric_arrays/valarray/28277.cc rename to libstdc++-v3/testsuite/26_numerics/valarray/28277.cc diff --git a/libstdc++-v3/testsuite/26_numerics/numeric_arrays/valarray/30416.cc b/libstdc++-v3/testsuite/26_numerics/valarray/30416.cc similarity index 100% rename from libstdc++-v3/testsuite/26_numerics/numeric_arrays/valarray/30416.cc rename to libstdc++-v3/testsuite/26_numerics/valarray/30416.cc diff --git a/libstdc++-v3/testsuite/26_numerics/numeric_arrays/valarray/33084.cc b/libstdc++-v3/testsuite/26_numerics/valarray/33084.cc similarity index 100% rename from libstdc++-v3/testsuite/26_numerics/numeric_arrays/valarray/33084.cc rename to libstdc++-v3/testsuite/26_numerics/valarray/33084.cc diff --git a/libstdc++-v3/testsuite/26_numerics/numeric_arrays/valarray/algo.cc b/libstdc++-v3/testsuite/26_numerics/valarray/algo.cc similarity index 100% rename from libstdc++-v3/testsuite/26_numerics/numeric_arrays/valarray/algo.cc rename to libstdc++-v3/testsuite/26_numerics/valarray/algo.cc diff --git a/libstdc++-v3/testsuite/26_numerics/numeric_arrays/valarray/binary_closure.cc b/libstdc++-v3/testsuite/26_numerics/valarray/binary_closure.cc similarity index 100% rename from libstdc++-v3/testsuite/26_numerics/numeric_arrays/valarray/binary_closure.cc rename to libstdc++-v3/testsuite/26_numerics/valarray/binary_closure.cc diff --git a/libstdc++-v3/testsuite/26_numerics/numeric_arrays/valarray/const_bracket.cc b/libstdc++-v3/testsuite/26_numerics/valarray/const_bracket.cc similarity index 100% rename from libstdc++-v3/testsuite/26_numerics/numeric_arrays/valarray/const_bracket.cc rename to libstdc++-v3/testsuite/26_numerics/valarray/const_bracket.cc diff --git a/libstdc++-v3/testsuite/26_numerics/numeric_arrays/valarray/dr543.cc b/libstdc++-v3/testsuite/26_numerics/valarray/dr543.cc similarity index 100% rename from libstdc++-v3/testsuite/26_numerics/numeric_arrays/valarray/dr543.cc rename to libstdc++-v3/testsuite/26_numerics/valarray/dr543.cc diff --git a/libstdc++-v3/testsuite/26_numerics/numeric_arrays/valarray/name_lookup.cc b/libstdc++-v3/testsuite/26_numerics/valarray/name_lookup.cc similarity index 100% rename from libstdc++-v3/testsuite/26_numerics/numeric_arrays/valarray/name_lookup.cc rename to libstdc++-v3/testsuite/26_numerics/valarray/name_lookup.cc diff --git a/libstdc++-v3/testsuite/26_numerics/numeric_arrays/valarray/operators.cc b/libstdc++-v3/testsuite/26_numerics/valarray/operators.cc similarity index 100% rename from libstdc++-v3/testsuite/26_numerics/numeric_arrays/valarray/operators.cc rename to libstdc++-v3/testsuite/26_numerics/valarray/operators.cc diff --git a/libstdc++-v3/testsuite/26_numerics/numeric_arrays/valarray/requirements/explicit_instantiation.cc b/libstdc++-v3/testsuite/26_numerics/valarray/requirements/explicit_instantiation.cc similarity index 100% rename from libstdc++-v3/testsuite/26_numerics/numeric_arrays/valarray/requirements/explicit_instantiation.cc rename to libstdc++-v3/testsuite/26_numerics/valarray/requirements/explicit_instantiation.cc diff --git a/libstdc++-v3/testsuite/26_numerics/numeric_arrays/valarray/requirements/typedefs.cc b/libstdc++-v3/testsuite/26_numerics/valarray/requirements/typedefs.cc similarity index 100% rename from libstdc++-v3/testsuite/26_numerics/numeric_arrays/valarray/requirements/typedefs.cc rename to libstdc++-v3/testsuite/26_numerics/valarray/requirements/typedefs.cc diff --git a/libstdc++-v3/testsuite/26_numerics/numeric_arrays/valarray/subset_assignment.cc b/libstdc++-v3/testsuite/26_numerics/valarray/subset_assignment.cc similarity index 100% rename from libstdc++-v3/testsuite/26_numerics/numeric_arrays/valarray/subset_assignment.cc rename to libstdc++-v3/testsuite/26_numerics/valarray/subset_assignment.cc diff --git a/libstdc++-v3/testsuite/util/testsuite_api.h b/libstdc++-v3/testsuite/util/testsuite_api.h index 143ac67eff6f..3cd7c6177f7f 100644 --- a/libstdc++-v3/testsuite/util/testsuite_api.h +++ b/libstdc++-v3/testsuite/util/testsuite_api.h @@ -30,8 +30,8 @@ #include -#ifndef _TESTSUITE_EH -#define _TESTSUITE_EH 1 +#ifndef _TESTSUITE_API +#define _TESTSUITE_API 1 namespace __gnu_test { @@ -77,5 +77,64 @@ namespace __gnu_test { VERIFY( false ); } } }; + + // Testing type requirements for template arguments. + struct NonDefaultConstructible + { + NonDefaultConstructible(int) { } + NonDefaultConstructible(const NonDefaultConstructible&) { } + }; + + // See: 20.1.1 Template argument requirements. + inline bool + operator==(const NonDefaultConstructible&, const NonDefaultConstructible&) + { return false; } + + inline bool + operator<(const NonDefaultConstructible&, const NonDefaultConstructible&) + { return false; } + + // For 26 numeric algorithms requirements, need addable, + // subtractable, multiplicable. + inline NonDefaultConstructible + operator+(const NonDefaultConstructible& lhs, + const NonDefaultConstructible& rhs) + { return NonDefaultConstructible(1); } + + inline NonDefaultConstructible + operator-(const NonDefaultConstructible& lhs, + const NonDefaultConstructible& rhs) + { return NonDefaultConstructible(1); } + + inline NonDefaultConstructible + operator*(const NonDefaultConstructible& lhs, + const NonDefaultConstructible& rhs) + { return NonDefaultConstructible(1); } + + // Like unary_function, but takes no argument. (ie, void). + // Used for generator template parameter. + template + struct void_function + { + typedef _Result result_type; + + result_type + operator()() const + { + result_type r; + return r; + } + }; + + template<> + struct void_function + { + typedef NonDefaultConstructible result_type; + + result_type + operator()() const + { return result_type(2); } + }; + } #endif diff --git a/libstdc++-v3/testsuite/util/testsuite_character.h b/libstdc++-v3/testsuite/util/testsuite_character.h index 547775bd8864..dd33525da6cb 100644 --- a/libstdc++-v3/testsuite/util/testsuite_character.h +++ b/libstdc++-v3/testsuite/util/testsuite_character.h @@ -46,6 +46,8 @@ namespace __gnu_test int value; }; + // For 20.1 requirements for instantiable type: equality comparable + // and less than comparable. inline bool operator==(const pod_int& lhs, const pod_int& rhs) { return lhs.value == rhs.value; } @@ -54,6 +56,29 @@ namespace __gnu_test operator<(const pod_int& lhs, const pod_int& rhs) { return lhs.value < rhs.value; } + // For 26 numeric algorithms requirements, need addable, + // subtractable, multiplicable. + inline pod_int + operator+(const pod_int& lhs, const pod_int& rhs) + { + pod_int ret = { lhs.value + rhs.value }; + return ret; + } + + inline pod_int + operator-(const pod_int& lhs, const pod_int& rhs) + { + pod_int ret = { lhs.value - rhs.value }; + return ret; + } + + inline pod_int + operator*(const pod_int& lhs, const pod_int& rhs) + { + pod_int ret = { lhs.value * rhs.value }; + return ret; + } + struct pod_state { unsigned long value; diff --git a/libstdc++-v3/testsuite/util/testsuite_hooks.h b/libstdc++-v3/testsuite/util/testsuite_hooks.h index d92eef1500ce..cbd876d61fe1 100644 --- a/libstdc++-v3/testsuite/util/testsuite_hooks.h +++ b/libstdc++-v3/testsuite/util/testsuite_hooks.h @@ -159,24 +159,6 @@ namespace __gnu_test void run_tests_wrapped_env(const char*, const char*, const func_callback&); - - // For containers (23.1/3). - struct NonDefaultConstructible - { - NonDefaultConstructible(int) { } - }; - - inline bool - operator==(const NonDefaultConstructible&, - const NonDefaultConstructible&) - { return false; } - - inline bool - operator<(const NonDefaultConstructible&, - const NonDefaultConstructible&) - { return false; } - - // Counting. struct counter { -- 2.39.5