Skip to content

Commit 6438511

Browse files
committed
[libc++][NFC] Cleanup is_implicit_life_time test
Removed unsupported compilers and simplified the test a bit.
1 parent ef46f8a commit 6438511

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_implicit_lifetime.pass.cpp

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9-
// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
9+
// REQUIRES: std-at-least-c++23
1010

1111
// These compilers don't support __builtin_is_implicit_lifetime yet.
12-
// UNSUPPORTED: clang-19, gcc-14, gcc-15, apple-clang-16, apple-clang-17
12+
// UNSUPPORTED: clang-19, gcc-15, apple-clang-17
1313

1414
// <type_traits>
1515

@@ -139,13 +139,6 @@ constexpr void test_is_implicit_lifetime() {
139139
test_is_implicit_lifetime<T[94], true>();
140140
}
141141

142-
struct ArithmeticTypesTest {
143-
template <class T>
144-
constexpr void operator()() {
145-
test_is_implicit_lifetime<T>();
146-
}
147-
};
148-
149142
constexpr bool test() {
150143
// Standard fundamental C++ types
151144

@@ -155,7 +148,7 @@ constexpr bool test() {
155148
test_is_implicit_lifetime<const void, false>();
156149
test_is_implicit_lifetime<volatile void, false>();
157150

158-
types::for_each(types::arithmetic_types(), ArithmeticTypesTest{});
151+
types::for_each(types::arithmetic_types(), []<typename T> { test_is_implicit_lifetime<T>(); });
159152

160153
test_is_implicit_lifetime<Enum>();
161154
test_is_implicit_lifetime<SignedEnum>();

0 commit comments

Comments
 (0)