libstdc++: Test for feature test macros more accurately
Tests which check for feature test macros should use the no_pch option, so that we're really testing for the definition being in the intended header, and not just testing that it's present in <bits/stdc++.h> (which includes all the standard headers and so defines all the macros). libstdc++-v3/ChangeLog: * testsuite/18_support/byte/requirements.cc: Disable PCH. * testsuite/18_support/destroying_delete.cc: Likewise. * testsuite/18_support/source_location/1.cc: Likewise. * testsuite/18_support/source_location/version.cc: Likewise. * testsuite/18_support/type_info/constexpr.cc: Likewise. * testsuite/18_support/uncaught_exceptions/uncaught_exceptions.cc: Likewise. * testsuite/19_diagnostics/stacktrace/output.cc: Likewise. * testsuite/19_diagnostics/stacktrace/synopsis.cc: Likewise. * testsuite/19_diagnostics/stacktrace/version.cc: Likewise. * testsuite/20_util/addressof/requirements/constexpr.cc: Likewise. * testsuite/20_util/allocator_traits/header-2.cc: Likewise. * testsuite/20_util/allocator_traits/header.cc: Likewise. * testsuite/20_util/as_const/1.cc: Likewise. Likewise. * testsuite/20_util/bitset/cons/constexpr_c++23.cc: Likewise. * testsuite/20_util/bitset/version.cc: Likewise. * testsuite/20_util/duration/arithmetic/constexpr_c++17.cc: Likewise. * testsuite/20_util/duration_cast/rounding.cc: Likewise. * testsuite/20_util/enable_shared_from_this/members/weak_from_this.cc: Likewise. * testsuite/20_util/exchange/constexpr.cc: Likewise. * testsuite/20_util/expected/synopsis.cc: Likewise. * testsuite/20_util/expected/version.cc: Likewise. * testsuite/20_util/function_objects/bind_front/1.cc: Likewise. * testsuite/20_util/function_objects/bind_front/2.cc: Likewise. * testsuite/20_util/function_objects/invoke/3.cc: Likewise. * testsuite/20_util/function_objects/invoke/4.cc: Likewise. * testsuite/20_util/function_objects/invoke/constexpr.cc: Likewise. * testsuite/20_util/function_objects/invoke/version.cc: Likewise. * testsuite/20_util/function_objects/searchers.cc: Likewise. * testsuite/20_util/integer_comparisons/1.cc: Likewise. * testsuite/20_util/integer_comparisons/2.cc: Likewise. * testsuite/20_util/is_bounded_array/value.cc: Likewise. * testsuite/20_util/is_layout_compatible/value.cc: Likewise. * testsuite/20_util/is_layout_compatible/version.cc: Likewise. * testsuite/20_util/is_nothrow_swappable/requirements/explicit_instantiation.cc: Likewise. * testsuite/20_util/is_nothrow_swappable/requirements/typedefs.cc: Likewise. * testsuite/20_util/is_nothrow_swappable/value.cc: Likewise. * testsuite/20_util/is_nothrow_swappable/value.h: Likewise. * testsuite/20_util/is_nothrow_swappable_with/requirements/explicit_instantiation.cc: Remove redundant checks already tested elsewhere. * testsuite/20_util/is_nothrow_swappable_with/requirements/typedefs.cc: Likewise. * testsuite/20_util/is_nothrow_swappable_with/value.cc: Disable PCH. * testsuite/20_util/is_pointer_interconvertible/value.cc: Likewise. * testsuite/20_util/is_pointer_interconvertible/version.cc: Likewise. * testsuite/20_util/is_scoped_enum/value.cc: Likewise. * testsuite/20_util/is_scoped_enum/version.cc: Likewise. * testsuite/20_util/is_swappable/requirements/explicit_instantiation.cc: Remove redundant checks already tested elsewhere. * testsuite/20_util/is_swappable/requirements/typedefs.cc: Remove redundant checks already tested elsewhere. * testsuite/20_util/is_swappable/value.cc: Disable PCH. * testsuite/20_util/is_swappable/value.h: Reorder headers. * testsuite/20_util/is_swappable_with/requirements/explicit_instantiation.cc: Remove redundant checks already tested elsewhere. * testsuite/20_util/is_swappable_with/requirements/typedefs.cc: Remove redundant checks already tested elsewhere. * testsuite/20_util/is_swappable_with/value.cc: Disable PCH. * testsuite/20_util/is_unbounded_array/value.cc: Likewise. * testsuite/20_util/move_only_function/cons.cc: Likewise. * testsuite/20_util/move_only_function/version.cc: Likewise. * testsuite/20_util/optional/monadic/and_then.cc: Likewise. * testsuite/20_util/optional/requirements.cc: Likewise. * testsuite/20_util/optional/version.cc: Likewise. * testsuite/20_util/owner_less/void.cc: Likewise. * testsuite/20_util/reference_from_temporary/value.cc: Likewise. * testsuite/20_util/reference_from_temporary/version.cc: Likewise. * testsuite/20_util/shared_ptr/atomic/atomic_shared_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/creation/array.cc: Likewise. * testsuite/20_util/shared_ptr/creation/overwrite.cc: Likewise. * testsuite/20_util/shared_ptr/creation/version.cc: Likewise. * testsuite/20_util/time_point_cast/rounding.cc: Likewise. * testsuite/20_util/to_chars/constexpr.cc: Likewise. * testsuite/20_util/to_chars/result.cc: Likewise. * testsuite/20_util/to_chars/version.cc: Likewise. * testsuite/20_util/to_underlying/1.cc: Likewise. * testsuite/20_util/to_underlying/version.cc: Likewise. * testsuite/20_util/tuple/apply/1.cc: Likewise. * testsuite/20_util/tuple/cons/constexpr_allocator_arg_t.cc: Likewise. * testsuite/20_util/tuple/make_from_tuple/1.cc: Likewise. * testsuite/20_util/tuple/p2321r2.cc: Likewise. * testsuite/20_util/tuple/tuple_element_t.cc: Likewise. * testsuite/20_util/unique_ptr/cons/constexpr_c++20.cc: Likewise. * testsuite/20_util/unique_ptr/creation/for_overwrite.cc: Likewise. * testsuite/20_util/unreachable/1.cc: Likewise. * testsuite/20_util/unreachable/version.cc: Likewise. * testsuite/20_util/unwrap_reference/1.cc: Likewise. * testsuite/20_util/unwrap_reference/3.cc: Likewise. * testsuite/20_util/variant/constexpr.cc: Likewise. * testsuite/20_util/variant/version.cc: Likewise. * testsuite/20_util/variant/visit_inherited.cc: Likewise. * testsuite/20_util/void_t/1.cc: Likewise. * testsuite/21_strings/basic_string/capacity/char/resize_and_overwrite.cc: Likewise. * testsuite/21_strings/basic_string/cons/char/constexpr.cc: Likewise. * testsuite/21_strings/basic_string/cons/wchar_t/constexpr.cc: Likewise. * testsuite/21_strings/basic_string/erasure.cc: Likewise. * testsuite/21_strings/basic_string/numeric_conversions/char/to_string_float.cc: Likewise. * testsuite/21_strings/basic_string/numeric_conversions/version.cc: Likewise. * testsuite/21_strings/basic_string/version.cc: Likewise. * testsuite/21_strings/basic_string_view/operations/contains/char.cc: Likewise. * testsuite/21_strings/basic_string_view/operations/contains/char/2.cc: Likewise. * testsuite/21_strings/basic_string_view/operations/copy/char/constexpr.cc: Likewise. * testsuite/21_strings/char_traits/requirements/constexpr_functions_c++17.cc: Likewise. * testsuite/21_strings/char_traits/requirements/constexpr_functions_c++20.cc: Likewise. * testsuite/21_strings/char_traits/requirements/version.cc: Likewise. * testsuite/23_containers/array/comparison_operators/constexpr.cc: Likewise. * testsuite/23_containers/array/creation/1.cc: Likewise. * testsuite/23_containers/array/creation/2.cc: Likewise. * testsuite/23_containers/array/element_access/constexpr_c++17.cc: Likewise. * testsuite/23_containers/array/requirements/constexpr_fill.cc: Likewise. * testsuite/23_containers/array/requirements/constexpr_iter.cc: Likewise. * testsuite/23_containers/deque/erasure.cc: Likewise. * testsuite/23_containers/forward_list/erasure.cc: Likewise. * testsuite/23_containers/list/erasure.cc: Likewise. * testsuite/23_containers/map/erasure.cc: Likewise. * testsuite/23_containers/queue/cons_from_iters.cc: Likewise. * testsuite/23_containers/set/erasure.cc: Likewise. * testsuite/23_containers/span/1.cc: Likewise. * testsuite/23_containers/span/2.cc: Likewise. * testsuite/23_containers/stack/cons_from_iters.cc: Likewise. * testsuite/23_containers/unordered_map/erasure.cc: Likewise. * testsuite/23_containers/unordered_map/operations/1.cc: Likewise. * testsuite/23_containers/unordered_set/erasure.cc: Likewise. * testsuite/23_containers/unordered_set/operations/1.cc: Likewise. * testsuite/23_containers/vector/cons/constexpr.cc: Likewise. * testsuite/23_containers/vector/erasure.cc: Likewise. * testsuite/23_containers/vector/requirements/version.cc: Likewise. * testsuite/24_iterators/insert_iterator/constexpr.cc: Likewise. * testsuite/25_algorithms/clamp/constexpr.cc: Likewise. * testsuite/25_algorithms/clamp/requirements/explicit_instantiation/1.cc: Remove redundant checks already tested elsewhere. * testsuite/25_algorithms/constexpr_macro.cc: Likewise. * testsuite/25_algorithms/cpp_lib_constexpr.cc: Likewise. * testsuite/25_algorithms/fold_left/1.cc: Likewise. * testsuite/25_algorithms/pstl/feature_test-2.cc: Likewise. * testsuite/25_algorithms/pstl/feature_test-3.cc: Likewise. * testsuite/25_algorithms/pstl/feature_test-4.cc: Likewise. * testsuite/25_algorithms/pstl/feature_test-5.cc: Likewise. * testsuite/25_algorithms/pstl/feature_test.cc: Likewise. * testsuite/26_numerics/bit/bit.byteswap/byteswap.cc: Likewise. * testsuite/26_numerics/bit/bit.byteswap/version.cc: Likewise. * testsuite/26_numerics/bit/bit.cast/bit_cast.cc: Likewise. * testsuite/26_numerics/bit/bit.cast/version.cc: Likewise. * testsuite/26_numerics/bit/header-2.cc: Likewise. * testsuite/26_numerics/bit/header.cc: Likewise. * testsuite/26_numerics/complex/1.cc: Likewise. * testsuite/26_numerics/complex/2.cc: Likewise. * testsuite/26_numerics/endian/2.cc: Likewise. * testsuite/26_numerics/endian/3.cc: Likewise. * testsuite/26_numerics/gcd/1.cc: Likewise. * testsuite/26_numerics/lcm/1.cc: Likewise. * testsuite/26_numerics/lerp/1.cc: Likewise. * testsuite/26_numerics/lerp/version.cc: Likewise. * testsuite/26_numerics/midpoint/integral.cc: Likewise. * testsuite/26_numerics/midpoint/version.cc: Likewise. * testsuite/26_numerics/numbers/1.cc: Likewise. * testsuite/26_numerics/numbers/2.cc: Likewise. * testsuite/27_io/basic_filebuf/native_handle/char/1.cc: Likewise. * testsuite/27_io/basic_filebuf/native_handle/version.cc: Likewise. * testsuite/27_io/basic_ofstream/open/char/noreplace.cc: Likewise. * testsuite/27_io/basic_ofstream/open/wchar_t/noreplace.cc: Likewise. * testsuite/27_io/basic_syncbuf/1.cc: Likewise. * testsuite/27_io/basic_syncbuf/2.cc: Likewise. * testsuite/27_io/basic_syncstream/1.cc: Likewise. * testsuite/27_io/basic_syncstream/2.cc: Likewise. * testsuite/27_io/spanstream/1.cc: Likewise. * testsuite/27_io/spanstream/version.cc: Likewise. * testsuite/29_atomics/atomic/cons/value_init.cc: Likewise. * testsuite/29_atomics/atomic/lock_free_aliases.cc: Likewise. * testsuite/29_atomics/atomic/wait_notify/1.cc: Likewise. * testsuite/29_atomics/atomic/wait_notify/2.cc: Likewise. * testsuite/29_atomics/headers/stdatomic.h/c_compat.cc: Likewise. * testsuite/29_atomics/headers/stdatomic.h/version.cc: Likewise. * testsuite/30_threads/barrier/1.cc: Likewise. * testsuite/30_threads/barrier/2.cc: Likewise. * testsuite/30_threads/condition_variable_any/stop_token/1.cc: Likewise. * testsuite/30_threads/condition_variable_any/stop_token/2.cc: Likewise. * testsuite/30_threads/jthread/1.cc: Likewise. * testsuite/30_threads/jthread/version.cc: Likewise. * testsuite/30_threads/latch/1.cc: Likewise. * testsuite/30_threads/latch/2.cc: Likewise. * testsuite/30_threads/scoped_lock/requirements/typedefs.cc: Likewise. * testsuite/30_threads/semaphore/1.cc: Likewise. * testsuite/30_threads/semaphore/2.cc: Likewise. * testsuite/30_threads/stop_token/1.cc: Likewise. * testsuite/30_threads/stop_token/2.cc: Likewise. * testsuite/experimental/feat-char8_t.cc: Likewise. * testsuite/experimental/iterator/ostream_joiner.cc: Likewise. * testsuite/experimental/numeric/gcd.cc: Likewise. * testsuite/experimental/scopeguard/uniqueres.cc: Likewise. * testsuite/std/concepts/1.cc: Likewise. * testsuite/std/concepts/2.cc: Likewise. * testsuite/std/ranges/adaptors/as_const/1.cc: Likewise. * testsuite/std/ranges/adaptors/as_rvalue/1.cc: Likewise. * testsuite/std/ranges/adaptors/chunk/1.cc: Likewise. * testsuite/std/ranges/adaptors/chunk_by/1.cc: Likewise. * testsuite/std/ranges/adaptors/enumerate/1.cc: Likewise. * testsuite/std/ranges/adaptors/join_with/1.cc: Likewise. * testsuite/std/ranges/adaptors/slide/1.cc: Likewise. * testsuite/std/ranges/adaptors/stride/1.cc: Likewise. * testsuite/std/ranges/cartesian_product/1.cc: Likewise. * testsuite/std/ranges/headers/ranges/synopsis.cc: Likewise. * testsuite/std/ranges/repeat/1.cc: Likewise. * testsuite/std/ranges/version_c++23.cc: Likewise. * testsuite/std/ranges/zip/1.cc: Likewise. * testsuite/std/time/syn_c++20.cc: Likewise. * testsuite/experimental/feat-cxx14.cc: Likewise. Include <algorithm> and <iterator>. * testsuite/23_containers/array/tuple_interface/get_neg.cc: Adjust dg-error line numbers.
This commit is contained in:
parent
e469f9003d
commit
f4ab68469c
200 changed files with 368 additions and 174 deletions
|
@ -16,6 +16,7 @@
|
|||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
// { dg-do compile { target c++17 } }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
#include <cstddef>
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
// { dg-do run { target c++20 } }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
#include <new>
|
||||
#include <type_traits>
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
|
||||
// { dg-options "-include string -include stdexcept" }
|
||||
// { dg-do run { target c++20 } }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
#include <source_location>
|
||||
|
||||
|
@ -125,7 +126,7 @@ int main ()
|
|||
member_defaulted_sl.member.file_name());
|
||||
std::string_view member_defaulted_sl_fn_name(
|
||||
member_defaulted_sl.member.function_name());
|
||||
VERIFY(member_defaulted_sl.member.line() == 46);
|
||||
VERIFY(member_defaulted_sl.member.line() == 47);
|
||||
// closing paren of constructor declaration
|
||||
VERIFY(member_defaulted_sl.member.column() == 25);
|
||||
VERIFY(member_defaulted_sl_fn_name.starts_with("s::s(int)"sv));
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
// { dg-do preprocess { target c++20 } }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
#include <version>
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
// { dg-options "-frtti" }
|
||||
// { dg-do compile { target c++23 } }
|
||||
// { dg-additional-options "-fdelete-null-pointer-checks" }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
#include <typeinfo>
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
// { dg-do run { target c++17 } }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
#include <cassert>
|
||||
#include <exception>
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
// { dg-do compile { target c++23 } }
|
||||
// { dg-require-effective-target stacktrace }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
#include <stacktrace>
|
||||
#include <sstream>
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
// { dg-do compile { target c++23 } }
|
||||
// { dg-require-effective-target stacktrace }
|
||||
// { dg-require-normal-namespace "" }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
#include <stacktrace>
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
// { dg-do preprocess { target c++23 } }
|
||||
// { dg-require-effective-target stacktrace }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
#include <version>
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
// { dg-do compile { target c++17 } }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
#include <utility>
|
||||
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
|
||||
// { dg-do compile { target c++20 } }
|
||||
// { dg-require-effective-target hosted }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
#include <version>
|
||||
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
|
||||
// { dg-do compile { target c++20 } }
|
||||
// { dg-require-effective-target hosted }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
#include <memory>
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
// { dg-do compile { target c++17 } }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
#include <utility>
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
// { dg-do compile { target c++23 } }
|
||||
// This test relies on std::string.
|
||||
// { dg-require-effective-target hosted }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
#include <bitset>
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
// { dg-do preprocess { target c++23 } }
|
||||
// { dg-require-effective-target hosted }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
#include <version>
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// { dg-do compile { target c++17 } }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
// Copyright (C) 2011-2023 Free Software Foundation, Inc.
|
||||
//
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
// { dg-do compile { target c++17 } }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
#include <chrono>
|
||||
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
|
||||
// { dg-do run { target c++17 } }
|
||||
// { dg-require-effective-target hosted }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
#include <memory>
|
||||
#include <testsuite_hooks.h>
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
// { dg-do compile { target c++20 } }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
#include <utility>
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
// { dg-do compile { target c++23 } }
|
||||
// { dg-require-normal-namespace "" }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
#include <expected>
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// { dg-do preprocess { target c++23 } }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
#include <version>
|
||||
|
||||
|
|
|
@ -16,16 +16,18 @@
|
|||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
// { dg-do run { target c++20 } }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
#include <functional>
|
||||
#include <testsuite_hooks.h>
|
||||
|
||||
#ifndef __cpp_lib_bind_front
|
||||
# error "Feature test macro for bind_front is missing"
|
||||
# error "Feature test macro for bind_front is missing in <functional>"
|
||||
#elif __cpp_lib_bind_front < 201902L
|
||||
# error "Feature test macro for bind_front has wrong value"
|
||||
# error "Feature test macro for bind_front has wrong value in <functional>"
|
||||
#endif
|
||||
|
||||
#include <testsuite_hooks.h>
|
||||
|
||||
using std::bind_front;
|
||||
using std::is_same_v;
|
||||
using std::is_invocable_v;
|
||||
|
|
|
@ -16,20 +16,22 @@
|
|||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
// { dg-do run { target c++20 } }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <testsuite_hooks.h>
|
||||
|
||||
// P1651R0 bind_front should not unwrap reference_wrapper
|
||||
|
||||
#ifndef __cpp_lib_bind_front
|
||||
# error "Feature test macro for bind_front is missing"
|
||||
# error "Feature test macro for bind_front is missing in <functional>"
|
||||
#elif __cpp_lib_bind_front < 201907L
|
||||
# error "Feature test macro for bind_front has wrong value"
|
||||
# error "Feature test macro for bind_front has wrong value in <functional>"
|
||||
#endif
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <testsuite_hooks.h>
|
||||
|
||||
void functionAcceptingStringView(std::string_view) { }
|
||||
|
||||
void
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
// { dg-do compile { target c++17 } }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
#include <functional>
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// { dg-do compile { target c++23 } }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
#include <functional>
|
||||
|
||||
|
|
|
@ -16,13 +16,14 @@
|
|||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
// { dg-do compile { target c++20 } }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
#include <functional>
|
||||
|
||||
#ifndef __cpp_lib_constexpr_functional
|
||||
# error "Feature test macro for constexpr invoke is missing"
|
||||
# error "Feature test macro for constexpr invoke is missing in <functional>"
|
||||
#elif __cpp_lib_constexpr_functional < 201907L
|
||||
# error "Feature test macro for constexpr invoke has wrong value"
|
||||
# error "Feature test macro for constexpr invoke has wrong value in <functional>"
|
||||
#endif
|
||||
|
||||
constexpr int inc(int i) { return i + 1; }
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// { dg-do compile { target c++17 } }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
#include <version>
|
||||
|
||||
|
|
|
@ -16,22 +16,24 @@
|
|||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
// { dg-do run { target c++17 } }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
#include <functional>
|
||||
|
||||
#if __STDC_HOSTED__
|
||||
# ifndef __cpp_lib_boyer_moore_searcher
|
||||
# error "Feature-test macro for searchers missing in <functional>"
|
||||
# elif __cpp_lib_boyer_moore_searcher < 201603
|
||||
# error "Feature-test macro for searchers has wrong value in <functional>"
|
||||
# endif
|
||||
#endif // HOSTED
|
||||
|
||||
#include <string_view>
|
||||
#include <cstring>
|
||||
#include <cctype>
|
||||
#include <algorithm>
|
||||
#include <testsuite_hooks.h>
|
||||
|
||||
#if __STDC_HOSTED__
|
||||
# ifndef __cpp_lib_boyer_moore_searcher
|
||||
# error "Feature-test macro for searchers missing"
|
||||
# elif __cpp_lib_boyer_moore_searcher < 201603
|
||||
# error "Feature-test macro for searchers has wrong value"
|
||||
# endif
|
||||
#endif // HOSTED
|
||||
|
||||
using std::default_searcher;
|
||||
#if __STDC_HOSTED__
|
||||
using std::boyer_moore_searcher;
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
// { dg-do preprocess { target c++20 } }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
#include <utility>
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
// { dg-do preprocess { target c++20 } }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
#include <version>
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// { dg-do compile { target c++20 } }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
// Copyright (C) 2019-2023 Free Software Foundation, Inc.
|
||||
//
|
||||
|
@ -18,14 +19,15 @@
|
|||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include <type_traits>
|
||||
#include <testsuite_tr1.h>
|
||||
|
||||
#ifndef __cpp_lib_bounded_array_traits
|
||||
# error "Feature test macro for is_bounded_array is missing"
|
||||
# error "Feature test macro for is_bounded_array is missing in <type_traits>"
|
||||
#elif __cpp_lib_bounded_array_traits < 201902L
|
||||
# error "Feature test macro for is_bounded_array has wrong value"
|
||||
# error "Feature test macro for is_bounded_array has wrong value in <type_traits>"
|
||||
#endif
|
||||
|
||||
#include <testsuite_tr1.h>
|
||||
|
||||
void test01()
|
||||
{
|
||||
using std::is_bounded_array;
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
// { dg-do compile { target c++20 } }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
#include <type_traits>
|
||||
|
||||
#ifndef __cpp_lib_is_layout_compatible
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// { dg-do compile { target c++20 } }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
#include <version>
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// { dg-do compile { target c++17 } }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
// Copyright (C) 2015-2023 Free Software Foundation, Inc.
|
||||
//
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// { dg-do compile { target c++17 } }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
// Copyright (C) 2015-2023 Free Software Foundation, Inc.
|
||||
//
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// { dg-do compile { target c++17 } }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
// Copyright (C) 2015-2023 Free Software Foundation, Inc.
|
||||
//
|
||||
|
|
|
@ -16,12 +16,6 @@
|
|||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include <type_traits>
|
||||
#include <testsuite_tr1.h>
|
||||
#include <utility>
|
||||
#include <array>
|
||||
#include <tuple>
|
||||
#include <queue>
|
||||
#include <stack>
|
||||
|
||||
#if defined(test_std_is_nothrow_swappable)
|
||||
# ifndef __cpp_lib_is_swappable
|
||||
|
@ -41,6 +35,13 @@ using is_nothrow_swappable = std::__is_nothrow_swappable<T>;
|
|||
"test_std_is_nothrow_swappable_ext need to be defined"
|
||||
#endif
|
||||
|
||||
#include <utility>
|
||||
#include <array>
|
||||
#include <tuple>
|
||||
#include <queue>
|
||||
#include <stack>
|
||||
#include <testsuite_tr1.h>
|
||||
|
||||
namespace funny {
|
||||
struct F {};
|
||||
void swap(F&, F&) = delete;
|
||||
|
|
|
@ -19,12 +19,6 @@
|
|||
|
||||
#include <type_traits>
|
||||
|
||||
#ifndef __cpp_lib_is_swappable
|
||||
# error "Feature-test macro for is_nothrow_swappable_with missing"
|
||||
#elif __cpp_lib_is_swappable != 201603
|
||||
# error "Feature-test macro for is_nothrow_swappable_with has wrong value"
|
||||
#endif
|
||||
|
||||
namespace std
|
||||
{
|
||||
typedef short test_type;
|
||||
|
|
|
@ -19,12 +19,6 @@
|
|||
|
||||
#include <type_traits>
|
||||
|
||||
#ifndef __cpp_lib_is_swappable
|
||||
# error "Feature-test macro for is_nothrow_swappable_with missing"
|
||||
#elif __cpp_lib_is_swappable != 201603
|
||||
# error "Feature-test macro for is_nothrow_swappable_with has wrong value"
|
||||
#endif
|
||||
|
||||
void test01()
|
||||
{
|
||||
// Check for required typedefs
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// { dg-do compile { target c++17 } }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
// Copyright (C) 2016-2023 Free Software Foundation, Inc.
|
||||
//
|
||||
|
@ -18,7 +19,6 @@
|
|||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include <type_traits>
|
||||
#include <testsuite_tr1.h>
|
||||
|
||||
#ifndef __cpp_lib_is_swappable
|
||||
# error "Feature-test macro for is_nothrow_swappable_with missing"
|
||||
|
@ -26,6 +26,8 @@
|
|||
# error "Feature-test macro for is_nothrow_swappable_with has wrong value"
|
||||
#endif
|
||||
|
||||
#include <testsuite_tr1.h>
|
||||
|
||||
namespace funny {
|
||||
struct T0 {};
|
||||
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
// { dg-do compile { target c++20 } }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
#include <type_traits>
|
||||
|
||||
#ifndef __cpp_lib_is_pointer_interconvertible
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// { dg-do compile { target c++20 } }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
#include <version>
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
// { dg-do compile { target c++23 } }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
#include <type_traits>
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
// { dg-do compile { target c++23 } }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
#include <version>
|
||||
|
||||
|
|
|
@ -19,12 +19,6 @@
|
|||
|
||||
#include <type_traits>
|
||||
|
||||
#ifndef __cpp_lib_is_swappable
|
||||
# error "Feature-test macro for is_swappable missing"
|
||||
#elif __cpp_lib_is_swappable != 201603
|
||||
# error "Feature-test macro for is_swappable has wrong value"
|
||||
#endif
|
||||
|
||||
namespace std
|
||||
{
|
||||
typedef short test_type;
|
||||
|
|
|
@ -19,12 +19,6 @@
|
|||
|
||||
#include <type_traits>
|
||||
|
||||
#ifndef __cpp_lib_is_swappable
|
||||
# error "Feature-test macro for is_swappable missing"
|
||||
#elif __cpp_lib_is_swappable != 201603
|
||||
# error "Feature-test macro for is_swappable has wrong value"
|
||||
#endif
|
||||
|
||||
void test01()
|
||||
{
|
||||
// Check for required typedefs
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// { dg-do compile { target c++17 } }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
// Copyright (C) 2015-2023 Free Software Foundation, Inc.
|
||||
//
|
||||
|
|
|
@ -16,12 +16,6 @@
|
|||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include <type_traits>
|
||||
#include <testsuite_tr1.h>
|
||||
#include <utility>
|
||||
#include <array>
|
||||
#include <tuple>
|
||||
#include <queue>
|
||||
#include <stack>
|
||||
|
||||
#if defined(test_std_is_swappable)
|
||||
# ifndef __cpp_lib_is_swappable
|
||||
|
@ -41,6 +35,13 @@ using is_swappable = std::__is_swappable<T>;
|
|||
"need to be defined"
|
||||
#endif
|
||||
|
||||
#include <utility>
|
||||
#include <array>
|
||||
#include <tuple>
|
||||
#include <queue>
|
||||
#include <stack>
|
||||
#include <testsuite_tr1.h>
|
||||
|
||||
namespace funny {
|
||||
struct F {};
|
||||
void swap(F&, F&) = delete;
|
||||
|
|
|
@ -19,12 +19,6 @@
|
|||
|
||||
#include <type_traits>
|
||||
|
||||
#ifndef __cpp_lib_is_swappable
|
||||
# error "Feature-test macro for is_swappable_with missing"
|
||||
#elif __cpp_lib_is_swappable != 201603
|
||||
# error "Feature-test macro for is_swappable_with has wrong value"
|
||||
#endif
|
||||
|
||||
namespace std
|
||||
{
|
||||
typedef short test_type;
|
||||
|
|
|
@ -19,12 +19,6 @@
|
|||
|
||||
#include <type_traits>
|
||||
|
||||
#ifndef __cpp_lib_is_swappable
|
||||
# error "Feature-test macro for is_swappable_with missing"
|
||||
#elif __cpp_lib_is_swappable != 201603
|
||||
# error "Feature-test macro for is_swappable_with has wrong value"
|
||||
#endif
|
||||
|
||||
void test01()
|
||||
{
|
||||
// Check for required typedefs
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// { dg-do compile { target c++17 } }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
// Copyright (C) 2016-2023 Free Software Foundation, Inc.
|
||||
//
|
||||
|
@ -18,7 +19,6 @@
|
|||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include <type_traits>
|
||||
#include <testsuite_tr1.h>
|
||||
|
||||
#ifndef __cpp_lib_is_swappable
|
||||
# error "Feature-test macro for is_swappable_with missing"
|
||||
|
@ -26,6 +26,8 @@
|
|||
# error "Feature-test macro for is_swappable_with has wrong value"
|
||||
#endif
|
||||
|
||||
#include <testsuite_tr1.h>
|
||||
|
||||
namespace funny {
|
||||
struct T0 {};
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// { dg-do compile { target c++20 } }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
// Copyright (C) 2019-2023 Free Software Foundation, Inc.
|
||||
//
|
||||
|
@ -18,7 +19,6 @@
|
|||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include <type_traits>
|
||||
#include <testsuite_tr1.h>
|
||||
|
||||
#ifndef __cpp_lib_bounded_array_traits
|
||||
# error "Feature test macro for is_unbounded_array is missing"
|
||||
|
@ -26,6 +26,8 @@
|
|||
# error "Feature test macro for is_unbounded_array has wrong value"
|
||||
#endif
|
||||
|
||||
#include <testsuite_tr1.h>
|
||||
|
||||
void test01()
|
||||
{
|
||||
using std::is_unbounded_array;
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
// { dg-do compile { target c++23 } }
|
||||
// { dg-require-effective-target hosted }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
#include <functional>
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
// { dg-do compile { target c++23 } }
|
||||
// { dg-require-effective-target hosted }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
#include <version>
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// { dg-do run { target c++23 } }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
#include <optional>
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// { dg-do run { target c++17 } }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
// Copyright (C) 2013-2023 Free Software Foundation, Inc.
|
||||
//
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// { dg-do compile { target c++17 } }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
#include <version>
|
||||
|
||||
|
|
|
@ -17,13 +17,14 @@
|
|||
|
||||
// { dg-do compile { target c++11 } }
|
||||
// { dg-require-effective-target hosted }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
#include <memory>
|
||||
|
||||
#if __cplusplus >= 201402L
|
||||
// The feature-test macro is only defined for C++14 and later.
|
||||
# if __cpp_lib_transparent_operators < 201510
|
||||
# error "__cpp_lib_transparent_operators < 201510"
|
||||
# error "__cpp_lib_transparent_operators < 201510 in <memory>"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
|
|
@ -16,16 +16,18 @@
|
|||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
// { dg-do compile { target c++23 } }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
#include <type_traits>
|
||||
#include <testsuite_tr1.h>
|
||||
|
||||
#ifndef __cpp_lib_reference_from_temporary
|
||||
# error "Feature test macro for reference_from_temporary is missing in <version>"
|
||||
# error "Feature test macro for reference_from_temporary is missing in <type_traits>"
|
||||
#elif __cpp_lib_reference_from_temporary < 202202L
|
||||
# error "Feature test macro for reference_from_temporary has wrong value in <version>"
|
||||
# error "Feature test macro for reference_from_temporary has wrong value in <type_traits>"
|
||||
#endif
|
||||
|
||||
#include <testsuite_tr1.h>
|
||||
|
||||
void test01()
|
||||
{
|
||||
using std::reference_constructs_from_temporary;
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
// { dg-do compile { target c++23 } }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
#include <version>
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
// { dg-require-effective-target gthreads }
|
||||
// { dg-additional-options "-pthread" { target pthread } }
|
||||
// { dg-add-options libatomic }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
#include <memory>
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// { dg-do run { target c++20 } }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
// C++20 20.11.3.7 shared_ptr Creation [util.smartptr.shared.create]
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
// { dg-options "-fno-lifetime-dse -O0" }
|
||||
// { dg-do run { target c++20 } }
|
||||
// { dg-require-effective-target hosted }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
// C++20 20.11.3.7 shared_ptr Creation [util.smartptr.shared.create]
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
// { dg-do preprocess { target c++20 } }
|
||||
// { dg-require-effective-target hosted }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
// C++20 20.11.3.7 shared_ptr Creation [util.smartptr.shared.create]
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
// { dg-do compile { target c++17 } }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
#include <chrono>
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// { dg-do compile { target c++23 } }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
#include <charconv>
|
||||
|
||||
|
|
|
@ -1,12 +1,14 @@
|
|||
// { dg-do run { target c++26 } }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
#include <charconv>
|
||||
#include <testsuite_hooks.h>
|
||||
|
||||
#if defined(__cpp_lib_to_chars) && __cpp_lib_to_chars < 202306L
|
||||
# error "Feature-test macro for std::to_chars has wrong value in <charconv>"
|
||||
#endif
|
||||
|
||||
#include <testsuite_hooks.h>
|
||||
|
||||
void
|
||||
test_result()
|
||||
{
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
// { dg-do preprocess { target c++23 } }
|
||||
// { dg-require-effective-target hosted }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
#include <version>
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
// { dg-do compile { target c++23 } }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
#include <utility>
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
// { dg-do compile { target c++23 } }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
#include <version>
|
||||
|
||||
|
|
|
@ -16,14 +16,16 @@
|
|||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
// { dg-do run { target c++17 } }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
#include <tuple>
|
||||
#include <testsuite_hooks.h>
|
||||
|
||||
#if __cpp_lib_apply < 201603
|
||||
# error "__cpp_lib_apply < 201603"
|
||||
#endif
|
||||
|
||||
#include <testsuite_hooks.h>
|
||||
|
||||
void
|
||||
test01()
|
||||
{
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
// { dg-do compile { target c++20 } }
|
||||
// FIXME [!HOSTED]: avoidable std::allocator usage
|
||||
// { dg-require-effective-target hosted }
|
||||
// { dg-add-options no_pch }
|
||||
//
|
||||
// Copyright (C) 2019-2023 Free Software Foundation, Inc.
|
||||
//
|
||||
|
|
|
@ -16,16 +16,18 @@
|
|||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
// { dg-do run { target c++17 } }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
#include <tuple>
|
||||
#include <testsuite_hooks.h>
|
||||
|
||||
#ifndef __cpp_lib_make_from_tuple
|
||||
# error "Feature-test macro for make_from_tuple missing."
|
||||
# error "Feature-test macro for make_from_tuple missing in <tuple>"
|
||||
#elif __cpp_lib_make_from_tuple < 201606
|
||||
# error "Feature-test macro for make_from_tuple has the wrong value."
|
||||
# error "Feature-test macro for make_from_tuple has the wrong value in <tuple>"
|
||||
#endif
|
||||
|
||||
#include <testsuite_hooks.h>
|
||||
|
||||
template <class T, class U, class V>
|
||||
struct ThreeParam
|
||||
{
|
||||
|
|
|
@ -2,15 +2,17 @@
|
|||
// { dg-do run { target c++23 } }
|
||||
// FIXME [!HOSTED]: avoidable std::allocator usage
|
||||
// { dg-require-effective-target hosted }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
#include <tuple>
|
||||
#include <memory>
|
||||
#include <testsuite_hooks.h>
|
||||
|
||||
#if __cpp_lib_ranges_zip != 202110L
|
||||
# error "Feature-test macro __cpp_lib_ranges_zip has wrong value in <tuple>"
|
||||
#endif
|
||||
|
||||
#include <memory>
|
||||
#include <testsuite_hooks.h>
|
||||
|
||||
using std::tuple;
|
||||
using std::pair;
|
||||
using std::allocator;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// { dg-do compile { target c++14 } }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
// Copyright (C) 2014-2023 Free Software Foundation, Inc.
|
||||
//
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// { dg-do compile { target c++23 } }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
#include <memory>
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
// { dg-do run { target c++20 } }
|
||||
// { dg-xfail-run-if "AIX operator new" { powerpc-ibm-aix* } }
|
||||
// { dg-require-effective-target hosted }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
// Copyright (C) 2020-2023 Free Software Foundation, Inc.
|
||||
//
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// { dg-do compile { target c++23 } }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
#include <utility>
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// { dg-do preprocess { target c++23 } }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
#include <version>
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
// { dg-do compile { target c++20 } }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
#include <type_traits>
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
// { dg-do compile { target c++20 } }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
#include <version>
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// { dg-do compile { target c++20 } }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
#include <variant>
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// { dg-do compile { target c++17 } }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
#include <version>
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// { dg-do compile { target c++17 } }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
#include <variant>
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
// { dg-do compile { target c++17 } }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
#include <type_traits>
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// { dg-do run { target c++23 } }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
#include <string>
|
||||
|
||||
|
@ -10,7 +11,6 @@
|
|||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
#include <cstring>
|
||||
#include <testsuite_hooks.h>
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
// { dg-do compile { target c++20 } }
|
||||
// { dg-require-effective-target cxx11_abi }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
#include <string>
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
// { dg-do compile { target c++20 } }
|
||||
// { dg-require-effective-target cxx11_abi }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
#include <string>
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// { dg-do run { target c++20 } }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
// Copyright (C) 2018-2023 Free Software Foundation, Inc.
|
||||
//
|
||||
|
@ -18,7 +19,6 @@
|
|||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include <string>
|
||||
#include <testsuite_hooks.h>
|
||||
|
||||
#ifndef __cpp_lib_erase_if
|
||||
# error "Feature-test macro for erase_if missing in <string>"
|
||||
|
@ -26,6 +26,8 @@
|
|||
# error "Feature-test macro for erase_if has wrong value in <string>"
|
||||
#endif
|
||||
|
||||
#include <testsuite_hooks.h>
|
||||
|
||||
void
|
||||
test01()
|
||||
{
|
||||
|
|
|
@ -1,9 +1,27 @@
|
|||
// { dg-do run { target c++11 } }
|
||||
// { dg-require-namedlocale "de_DE.ISO8859-15" }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
// C++11 21.5 Numeric Conversions [string.conversions]
|
||||
|
||||
#include <string>
|
||||
|
||||
#if __cplusplus > 202302L
|
||||
|
||||
#ifndef __cpp_lib_to_string
|
||||
# error "Feature-test macro for std::to_string missing in <string>"
|
||||
#elif __cpp_lib_to_string != 202306L
|
||||
# error "Feature-test macro for std::to_string has wrong value in <string>"
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
#ifdef __cpp_lib_to_string
|
||||
# error "__cpp_lib_to_string should not be defined for C++23"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#include <format>
|
||||
#include <limits>
|
||||
#include <locale>
|
||||
|
@ -14,24 +32,11 @@ namespace test
|
|||
{
|
||||
// Canonical version of std::to_string(double) as specified in the standard.
|
||||
|
||||
#if __cplusplus > 202302L
|
||||
|
||||
#ifndef __cpp_lib_to_string
|
||||
# error "Feature-test macro for std::to_string missing in <string>"
|
||||
#elif __cpp_lib_to_string != 202306L
|
||||
# error "Feature-test macro for std::to_string has wrong value in <string>"
|
||||
#endif
|
||||
|
||||
#if __cpp_lib_to_string
|
||||
static std::string to_string(float val) { return std::format("{}", val); }
|
||||
static std::string to_string(double val) { return std::format("{}", val); }
|
||||
static std::string to_string(long double val) { return std::format("{}", val); }
|
||||
|
||||
#else
|
||||
|
||||
#ifdef __cpp_lib_to_string
|
||||
# error "__cpp_lib_to_string should not be defined for C++23"
|
||||
#endif
|
||||
|
||||
static std::string to_string(double val)
|
||||
{
|
||||
std::string str(100, '9');
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
// { dg-do compile }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
#include <version>
|
||||
|
||||
#if __cplusplus > 202302L
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
// { dg-do compile { target c++17 } }
|
||||
// { dg-require-effective-target hosted }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
#include <version>
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// { dg-do compile { target c++23 } }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
// Copyright (C) 2021-2023 Free Software Foundation, Inc.
|
||||
//
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// { dg-do compile { target c++23 } }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
// Copyright (C) 2021-2023 Free Software Foundation, Inc.
|
||||
//
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
// { dg-do compile { target c++20 } }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
#include <string_view>
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// { dg-do compile { target c++17 } }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
// Copyright (C) 2017-2023 Free Software Foundation, Inc.
|
||||
//
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// { dg-do compile { target c++20 } }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
// Copyright (C) 2017-2023 Free Software Foundation, Inc.
|
||||
//
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
// { dg-do compile { target c++17 } }
|
||||
// { dg-require-effective-target hosted }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
#include <version>
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
// { dg-do compile { target c++20 } }
|
||||
//
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
// Copyright (C) 2019-2023 Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// { dg-do compile { target c++20 } }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
// Copyright (C) 2019-2023 Free Software Foundation, Inc.
|
||||
//
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue