diff options
Diffstat (limited to 'libcxx/test/std')
9 files changed, 43 insertions, 15 deletions
diff --git a/libcxx/test/std/atomics/atomics.ref/address.pass.cpp b/libcxx/test/std/atomics/atomics.ref/address.pass.cpp new file mode 100644 index 0000000..e0db6a9 --- /dev/null +++ b/libcxx/test/std/atomics/atomics.ref/address.pass.cpp @@ -0,0 +1,37 @@ +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// REQUIRES: std-at-least-c++26 + +// constexpr T* address() const noexcept; + +#include <atomic> +#include <cassert> +#include <concepts> +#include <memory> + +#include "atomic_helpers.h" +#include "test_macros.h" + +template <typename T> +struct TestAddress { + void operator()() const { + T x(T(1)); + const std::atomic_ref<T> a(x); + + std::same_as<T*> decltype(auto) p = a.address(); + assert(std::addressof(x) == p); + + static_assert(noexcept((a.address()))); + } +}; + +int main(int, char**) { + TestEachAtomicType<TestAddress>()(); + + return 0; +} diff --git a/libcxx/test/std/atomics/types.pass.cpp b/libcxx/test/std/atomics/types.pass.cpp index c979392..b1edec5 100644 --- a/libcxx/test/std/atomics/types.pass.cpp +++ b/libcxx/test/std/atomics/types.pass.cpp @@ -17,9 +17,6 @@ // typedef T value_type; // }; -// atomic still has a difference_type in the C++03 frozen headers -// XFAIL: FROZEN-CXX03-HEADERS-FIXME - #include <atomic> #include <chrono> #include <cstdint> diff --git a/libcxx/test/std/containers/sequences/vector/vector.cons/exceptions.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.cons/exceptions.pass.cpp index 00de053..679eec2 100644 --- a/libcxx/test/std/containers/sequences/vector/vector.cons/exceptions.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector/vector.cons/exceptions.pass.cpp @@ -11,8 +11,6 @@ // (bug report: https://llvm.org/PR58392) // Check that vector constructors don't leak memory when an operation inside the constructor throws an exception -// XFAIL: FROZEN-CXX03-HEADERS-FIXME - #include <cstddef> #include <memory> #include <type_traits> diff --git a/libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.cons/default.pass.cpp b/libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.cons/default.pass.cpp index dac4396..d131f5c 100644 --- a/libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.cons/default.pass.cpp +++ b/libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.cons/default.pass.cpp @@ -15,8 +15,6 @@ // basic_stringbuf() : basic_stringbuf(ios_base::in | ios_base::out) {} // C++20 // explicit basic_stringbuf(ios_base::openmode which); // C++20 -// XFAIL: FROZEN-CXX03-HEADERS-FIXME - #include <sstream> #include <cassert> diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/atomic.version.compile.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/atomic.version.compile.pass.cpp index 93eb43c..8bd0274 100644 --- a/libcxx/test/std/language.support/support.limits/support.limits.general/atomic.version.compile.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/atomic.version.compile.pass.cpp @@ -355,8 +355,8 @@ # ifndef __cpp_lib_atomic_ref # error "__cpp_lib_atomic_ref should be defined in c++26" # endif -# if __cpp_lib_atomic_ref != 201806L -# error "__cpp_lib_atomic_ref should have the value 201806L in c++26" +# if __cpp_lib_atomic_ref != 202411L +# error "__cpp_lib_atomic_ref should have the value 202411L in c++26" # endif # if !defined(_LIBCPP_VERSION) diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/version.version.compile.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/version.version.compile.pass.cpp index d1fd55f..05af1fb 100644 --- a/libcxx/test/std/language.support/support.limits/support.limits.general/version.version.compile.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/version.version.compile.pass.cpp @@ -6325,8 +6325,8 @@ # ifndef __cpp_lib_atomic_ref # error "__cpp_lib_atomic_ref should be defined in c++26" # endif -# if __cpp_lib_atomic_ref != 201806L -# error "__cpp_lib_atomic_ref should have the value 201806L in c++26" +# if __cpp_lib_atomic_ref != 202411L +# error "__cpp_lib_atomic_ref should have the value 202411L in c++26" # endif # if !defined(_LIBCPP_VERSION) diff --git a/libcxx/test/std/re/re.alg/re.alg.match/ecma.pass.cpp b/libcxx/test/std/re/re.alg/re.alg.match/ecma.pass.cpp index 799a362..0184a38 100644 --- a/libcxx/test/std/re/re.alg/re.alg.match/ecma.pass.cpp +++ b/libcxx/test/std/re/re.alg/re.alg.match/ecma.pass.cpp @@ -7,8 +7,6 @@ //===----------------------------------------------------------------------===// // -// XFAIL: FROZEN-CXX03-HEADERS-FIXME - // <regex> // template <class BidirectionalIterator, class Allocator, class charT, class traits> diff --git a/libcxx/test/std/re/re.regex/re.regex.construct/bad_range.pass.cpp b/libcxx/test/std/re/re.regex/re.regex.construct/bad_range.pass.cpp index ecfdaee..cabd9eb 100644 --- a/libcxx/test/std/re/re.regex/re.regex.construct/bad_range.pass.cpp +++ b/libcxx/test/std/re/re.regex/re.regex.construct/bad_range.pass.cpp @@ -14,8 +14,6 @@ // template <class ST, class SA> // basic_regex(const basic_string<charT, ST, SA>& s); -// XFAIL: FROZEN-CXX03-HEADERS-FIXME - #include <regex> #include <cassert> #include "test_macros.h" diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_implicit_lifetime.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_implicit_lifetime.pass.cpp index 5264e770..881a5d2 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_implicit_lifetime.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_implicit_lifetime.pass.cpp @@ -226,7 +226,9 @@ constexpr bool test() { #ifdef _LIBCPP_VERSION // These types should be implicit-lifetime, but they are not guaranteed to be so. +# ifndef _LIBCPP_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR test_is_implicit_lifetime<std::pair<int, float>>(); +# endif test_is_implicit_lifetime<std::tuple<int, float>>(); #endif |