diff --git a/stl/inc/utility b/stl/inc/utility index 326b5f8978b..49758027dcc 100644 --- a/stl/inc/utility +++ b/stl/inc/utility @@ -613,11 +613,36 @@ struct _Tuple_size_sfinae<_Tuple, void_t::value)>> template struct tuple_size : _Tuple_size_sfinae<_Tuple> {}; // ignore cv +// TRANSITION, DevCom-10948908, Clang fixed in 21: the [[deprecated]] attribute of a class template specialization +// has no effect +// See the specialization of tuple_size for volatile _Tuple +#if _HAS_CXX20 // vvv workaround vvv +template +struct _Tuple_size_sfinae::value)>> + : integral_constant::value> { + _CXX20_DEPRECATE_VOLATILE static constexpr size_t value = + integral_constant::value>::value; +}; + +template +struct _Tuple_size_sfinae::value)>> + : integral_constant::value> { + _CXX20_DEPRECATE_VOLATILE static constexpr size_t value = + integral_constant::value>::value; +}; + +template +struct _CXX20_DEPRECATE_VOLATILE tuple_size : _Tuple_size_sfinae {}; + +template +struct _CXX20_DEPRECATE_VOLATILE tuple_size : _Tuple_size_sfinae {}; +#else // ^^^ workaround / no workaround vvv template struct _CXX20_DEPRECATE_VOLATILE tuple_size : _Tuple_size_sfinae<_Tuple> {}; // ignore cv template struct _CXX20_DEPRECATE_VOLATILE tuple_size : _Tuple_size_sfinae<_Tuple> {}; // ignore cv +#endif // ^^^ no workaround ^^^ template struct _MSVC_KNOWN_SEMANTICS tuple_element<_Index, const _Tuple> : tuple_element<_Index, _Tuple> { @@ -628,15 +653,27 @@ struct _MSVC_KNOWN_SEMANTICS tuple_element<_Index, const _Tuple> : tuple_element template struct _CXX20_DEPRECATE_VOLATILE _MSVC_KNOWN_SEMANTICS tuple_element<_Index, volatile _Tuple> : tuple_element<_Index, _Tuple> { + // TRANSITION, DevCom-10948908, Clang fixed in 21: the [[deprecated]] attribute of a class template specialization + // has no effect +#if _HAS_CXX20 // vvv workaround vvv + using _Mybase _CXX20_DEPRECATE_VOLATILE = tuple_element<_Index, _Tuple>; +#else // ^^^ workaround / no workaround vvv using _Mybase = tuple_element<_Index, _Tuple>; - using type = add_volatile_t; +#endif // ^^^ no workaround ^^^ + using type = add_volatile_t; }; template struct _CXX20_DEPRECATE_VOLATILE _MSVC_KNOWN_SEMANTICS tuple_element<_Index, const volatile _Tuple> : tuple_element<_Index, _Tuple> { + // TRANSITION, DevCom-10948908, Clang fixed in 21: the [[deprecated]] attribute of a class template specialization + // has no effect +#if _HAS_CXX20 // vvv workaround vvv + using _Mybase _CXX20_DEPRECATE_VOLATILE = tuple_element<_Index, _Tuple>; +#else // ^^^ workaround / no workaround vvv using _Mybase = tuple_element<_Index, _Tuple>; - using type = add_cv_t; +#endif // ^^^ no workaround ^^^ + using type = add_cv_t; }; template diff --git a/stl/inc/variant b/stl/inc/variant index c17d88fe17e..2135e0aceb6 100644 --- a/stl/inc/variant +++ b/stl/inc/variant @@ -290,9 +290,21 @@ struct variant_size; // undefined template struct variant_size : variant_size<_Ty>::type {}; template -struct _CXX20_DEPRECATE_VOLATILE variant_size : variant_size<_Ty>::type {}; +struct _CXX20_DEPRECATE_VOLATILE variant_size : variant_size<_Ty>::type { + // TRANSITION, DevCom-10948908, Clang fixed in 21: the [[deprecated]] attribute of a class template specialization + // has no effect +#if _HAS_CXX20 // vvv workaround vvv + _CXX20_DEPRECATE_VOLATILE static constexpr size_t value = variant_size<_Ty>::type::value; +#endif // ^^^ no workaround ^^^ +}; template -struct _CXX20_DEPRECATE_VOLATILE variant_size : variant_size<_Ty>::type {}; +struct _CXX20_DEPRECATE_VOLATILE variant_size : variant_size<_Ty>::type { + // TRANSITION, DevCom-10948908, Clang fixed in 21: the [[deprecated]] attribute of a class template specialization + // has no effect +#if _HAS_CXX20 // vvv workaround vvv + _CXX20_DEPRECATE_VOLATILE static constexpr size_t value = variant_size<_Ty>::type::value; +#endif // ^^^ no workaround ^^^ +}; _EXPORT_STD template constexpr size_t variant_size_v = variant_size<_Ty>::value; @@ -309,11 +321,25 @@ struct variant_alternative<_Idx, const _Ty> { }; template struct _CXX20_DEPRECATE_VOLATILE variant_alternative<_Idx, volatile _Ty> { + // TRANSITION, DevCom-10948908, Clang fixed in 21: the [[deprecated]] attribute of a class template specialization + // has no effect +#if _HAS_CXX20 // vvv workaround vvv + using _Mybase _CXX20_DEPRECATE_VOLATILE = variant_alternative<_Idx, _Ty>; + using type = add_volatile_t; +#else // ^^^ workaround / no workaround vvv using type = add_volatile_t>; +#endif // ^^^ no workaround ^^^ }; template struct _CXX20_DEPRECATE_VOLATILE variant_alternative<_Idx, const volatile _Ty> { + // TRANSITION, DevCom-10948908, Clang fixed in 21: the [[deprecated]] attribute of a class template specialization + // has no effect +#if _HAS_CXX20 // vvv workaround vvv + using _Mybase _CXX20_DEPRECATE_VOLATILE = variant_alternative<_Idx, _Ty>; + using type = add_cv_t; +#else // ^^^ workaround / no workaround vvv using type = add_cv_t>; +#endif // ^^^ no workaround ^^^ }; template struct variant_alternative<_Idx, variant<_Types...>> { diff --git a/tests/std/expected_results.txt b/tests/std/expected_results.txt index 2ac2a854cb0..8579a7fcbc2 100644 --- a/tests/std/expected_results.txt +++ b/tests/std/expected_results.txt @@ -1,2 +1,196 @@ # Copyright (c) Microsoft Corporation. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + +# These tests are expected to fail under /WX + +tests/P1831R1_cpp20_volatile:00 FAIL +tests/P1831R1_cpp20_volatile:01 FAIL +tests/P1831R1_cpp20_volatile:02 FAIL +tests/P1831R1_cpp20_volatile:03 FAIL +tests/P1831R1_cpp20_volatile:04 FAIL +tests/P1831R1_cpp20_volatile:05 FAIL +tests/P1831R1_cpp20_volatile:06 FAIL +tests/P1831R1_cpp20_volatile:07 FAIL +tests/P1831R1_cpp20_volatile:08 FAIL +tests/P1831R1_cpp20_volatile:09 FAIL +tests/P1831R1_cpp20_volatile:10 FAIL +tests/P1831R1_cpp20_volatile:11 FAIL +tests/P1831R1_cpp20_volatile:12 FAIL +tests/P1831R1_cpp20_volatile:13 FAIL +tests/P1831R1_cpp20_volatile:16 FAIL +tests/P1831R1_cpp20_volatile:17 FAIL +tests/P1831R1_cpp20_volatile:18 FAIL +tests/P1831R1_cpp20_volatile:19 FAIL +tests/P1831R1_cpp20_volatile:20 FAIL +tests/P1831R1_cpp20_volatile:21 FAIL +tests/P1831R1_cpp20_volatile:22 FAIL +tests/P1831R1_cpp20_volatile:29 FAIL +tests/P1831R1_cpp20_volatile:30 FAIL + +tests/P1831R1_cpp20_volatile1:00 FAIL +tests/P1831R1_cpp20_volatile1:01 FAIL +tests/P1831R1_cpp20_volatile1:02 FAIL +tests/P1831R1_cpp20_volatile1:03 FAIL +tests/P1831R1_cpp20_volatile1:04 FAIL +tests/P1831R1_cpp20_volatile1:05 FAIL +tests/P1831R1_cpp20_volatile1:06 FAIL +tests/P1831R1_cpp20_volatile1:07 FAIL +tests/P1831R1_cpp20_volatile1:08 FAIL +tests/P1831R1_cpp20_volatile1:09 FAIL +tests/P1831R1_cpp20_volatile1:10 FAIL +tests/P1831R1_cpp20_volatile1:11 FAIL +tests/P1831R1_cpp20_volatile1:12 FAIL +tests/P1831R1_cpp20_volatile1:13 FAIL +tests/P1831R1_cpp20_volatile1:16 FAIL +tests/P1831R1_cpp20_volatile1:17 FAIL +tests/P1831R1_cpp20_volatile1:18 FAIL +tests/P1831R1_cpp20_volatile1:19 FAIL +tests/P1831R1_cpp20_volatile1:20 FAIL +tests/P1831R1_cpp20_volatile1:21 FAIL +tests/P1831R1_cpp20_volatile1:22 FAIL +tests/P1831R1_cpp20_volatile1:29 FAIL +tests/P1831R1_cpp20_volatile1:30 FAIL + +tests/P1831R1_cpp20_volatile2:00 FAIL +tests/P1831R1_cpp20_volatile2:01 FAIL +tests/P1831R1_cpp20_volatile2:02 FAIL +tests/P1831R1_cpp20_volatile2:03 FAIL +tests/P1831R1_cpp20_volatile2:04 FAIL +tests/P1831R1_cpp20_volatile2:05 FAIL +tests/P1831R1_cpp20_volatile2:06 FAIL +tests/P1831R1_cpp20_volatile2:07 FAIL +tests/P1831R1_cpp20_volatile2:08 FAIL +tests/P1831R1_cpp20_volatile2:09 FAIL +tests/P1831R1_cpp20_volatile2:10 FAIL +tests/P1831R1_cpp20_volatile2:11 FAIL +tests/P1831R1_cpp20_volatile2:12 FAIL +tests/P1831R1_cpp20_volatile2:13 FAIL +tests/P1831R1_cpp20_volatile2:16 FAIL +tests/P1831R1_cpp20_volatile2:17 FAIL +tests/P1831R1_cpp20_volatile2:18 FAIL +tests/P1831R1_cpp20_volatile2:19 FAIL +tests/P1831R1_cpp20_volatile2:20 FAIL +tests/P1831R1_cpp20_volatile2:21 FAIL +tests/P1831R1_cpp20_volatile2:22 FAIL +tests/P1831R1_cpp20_volatile2:29 FAIL +tests/P1831R1_cpp20_volatile2:30 FAIL + +tests/P1831R1_cpp20_volatile3:00 FAIL +tests/P1831R1_cpp20_volatile3:01 FAIL +tests/P1831R1_cpp20_volatile3:02 FAIL +tests/P1831R1_cpp20_volatile3:03 FAIL +tests/P1831R1_cpp20_volatile3:04 FAIL +tests/P1831R1_cpp20_volatile3:05 FAIL +tests/P1831R1_cpp20_volatile3:06 FAIL +tests/P1831R1_cpp20_volatile3:07 FAIL +tests/P1831R1_cpp20_volatile3:08 FAIL +tests/P1831R1_cpp20_volatile3:09 FAIL +tests/P1831R1_cpp20_volatile3:10 FAIL +tests/P1831R1_cpp20_volatile3:11 FAIL +tests/P1831R1_cpp20_volatile3:12 FAIL +tests/P1831R1_cpp20_volatile3:13 FAIL +tests/P1831R1_cpp20_volatile3:16 FAIL +tests/P1831R1_cpp20_volatile3:17 FAIL +tests/P1831R1_cpp20_volatile3:18 FAIL +tests/P1831R1_cpp20_volatile3:19 FAIL +tests/P1831R1_cpp20_volatile3:20 FAIL +tests/P1831R1_cpp20_volatile3:21 FAIL +tests/P1831R1_cpp20_volatile3:22 FAIL +tests/P1831R1_cpp20_volatile3:29 FAIL +tests/P1831R1_cpp20_volatile3:30 FAIL + +tests/P1831R1_cpp20_volatile4:00 FAIL +tests/P1831R1_cpp20_volatile4:01 FAIL +tests/P1831R1_cpp20_volatile4:02 FAIL +tests/P1831R1_cpp20_volatile4:03 FAIL +tests/P1831R1_cpp20_volatile4:04 FAIL +tests/P1831R1_cpp20_volatile4:05 FAIL +tests/P1831R1_cpp20_volatile4:06 FAIL +tests/P1831R1_cpp20_volatile4:07 FAIL +tests/P1831R1_cpp20_volatile4:08 FAIL +tests/P1831R1_cpp20_volatile4:09 FAIL +tests/P1831R1_cpp20_volatile4:10 FAIL +tests/P1831R1_cpp20_volatile4:11 FAIL +tests/P1831R1_cpp20_volatile4:12 FAIL +tests/P1831R1_cpp20_volatile4:13 FAIL +tests/P1831R1_cpp20_volatile4:16 FAIL +tests/P1831R1_cpp20_volatile4:17 FAIL +tests/P1831R1_cpp20_volatile4:18 FAIL +tests/P1831R1_cpp20_volatile4:19 FAIL +tests/P1831R1_cpp20_volatile4:20 FAIL +tests/P1831R1_cpp20_volatile4:21 FAIL +tests/P1831R1_cpp20_volatile4:22 FAIL +tests/P1831R1_cpp20_volatile4:29 FAIL +tests/P1831R1_cpp20_volatile4:30 FAIL + +tests/P1831R1_cpp20_volatile5:00 FAIL +tests/P1831R1_cpp20_volatile5:01 FAIL +tests/P1831R1_cpp20_volatile5:02 FAIL +tests/P1831R1_cpp20_volatile5:03 FAIL +tests/P1831R1_cpp20_volatile5:04 FAIL +tests/P1831R1_cpp20_volatile5:05 FAIL +tests/P1831R1_cpp20_volatile5:06 FAIL +tests/P1831R1_cpp20_volatile5:07 FAIL +tests/P1831R1_cpp20_volatile5:08 FAIL +tests/P1831R1_cpp20_volatile5:09 FAIL +tests/P1831R1_cpp20_volatile5:10 FAIL +tests/P1831R1_cpp20_volatile5:11 FAIL +tests/P1831R1_cpp20_volatile5:12 FAIL +tests/P1831R1_cpp20_volatile5:13 FAIL +tests/P1831R1_cpp20_volatile5:16 FAIL +tests/P1831R1_cpp20_volatile5:17 FAIL +tests/P1831R1_cpp20_volatile5:18 FAIL +tests/P1831R1_cpp20_volatile5:19 FAIL +tests/P1831R1_cpp20_volatile5:20 FAIL +tests/P1831R1_cpp20_volatile5:21 FAIL +tests/P1831R1_cpp20_volatile5:22 FAIL +tests/P1831R1_cpp20_volatile5:29 FAIL +tests/P1831R1_cpp20_volatile5:30 FAIL + +tests/P1831R1_cpp20_volatile6:00 FAIL +tests/P1831R1_cpp20_volatile6:01 FAIL +tests/P1831R1_cpp20_volatile6:02 FAIL +tests/P1831R1_cpp20_volatile6:03 FAIL +tests/P1831R1_cpp20_volatile6:04 FAIL +tests/P1831R1_cpp20_volatile6:05 FAIL +tests/P1831R1_cpp20_volatile6:06 FAIL +tests/P1831R1_cpp20_volatile6:07 FAIL +tests/P1831R1_cpp20_volatile6:08 FAIL +tests/P1831R1_cpp20_volatile6:09 FAIL +tests/P1831R1_cpp20_volatile6:10 FAIL +tests/P1831R1_cpp20_volatile6:11 FAIL +tests/P1831R1_cpp20_volatile6:12 FAIL +tests/P1831R1_cpp20_volatile6:13 FAIL +tests/P1831R1_cpp20_volatile6:16 FAIL +tests/P1831R1_cpp20_volatile6:17 FAIL +tests/P1831R1_cpp20_volatile6:18 FAIL +tests/P1831R1_cpp20_volatile6:19 FAIL +tests/P1831R1_cpp20_volatile6:20 FAIL +tests/P1831R1_cpp20_volatile6:21 FAIL +tests/P1831R1_cpp20_volatile6:22 FAIL +tests/P1831R1_cpp20_volatile6:29 FAIL +tests/P1831R1_cpp20_volatile6:30 FAIL + +tests/P1831R1_cpp20_volatile7:00 FAIL +tests/P1831R1_cpp20_volatile7:01 FAIL +tests/P1831R1_cpp20_volatile7:02 FAIL +tests/P1831R1_cpp20_volatile7:03 FAIL +tests/P1831R1_cpp20_volatile7:04 FAIL +tests/P1831R1_cpp20_volatile7:05 FAIL +tests/P1831R1_cpp20_volatile7:06 FAIL +tests/P1831R1_cpp20_volatile7:07 FAIL +tests/P1831R1_cpp20_volatile7:08 FAIL +tests/P1831R1_cpp20_volatile7:09 FAIL +tests/P1831R1_cpp20_volatile7:10 FAIL +tests/P1831R1_cpp20_volatile7:11 FAIL +tests/P1831R1_cpp20_volatile7:12 FAIL +tests/P1831R1_cpp20_volatile7:13 FAIL +tests/P1831R1_cpp20_volatile7:16 FAIL +tests/P1831R1_cpp20_volatile7:17 FAIL +tests/P1831R1_cpp20_volatile7:18 FAIL +tests/P1831R1_cpp20_volatile7:19 FAIL +tests/P1831R1_cpp20_volatile7:20 FAIL +tests/P1831R1_cpp20_volatile7:21 FAIL +tests/P1831R1_cpp20_volatile7:22 FAIL +tests/P1831R1_cpp20_volatile7:29 FAIL +tests/P1831R1_cpp20_volatile7:30 FAIL diff --git a/tests/std/test.lst b/tests/std/test.lst index 4a0b4c0864b..ba3352c56a1 100644 --- a/tests/std/test.lst +++ b/tests/std/test.lst @@ -621,6 +621,14 @@ tests\P1645R1_constexpr_numeric tests\P1659R3_ranges_alg_ends_with tests\P1659R3_ranges_alg_starts_with tests\P1682R3_to_underlying +tests\P1831R1_cpp20_volatile +tests\P1831R1_cpp20_volatile1 +tests\P1831R1_cpp20_volatile2 +tests\P1831R1_cpp20_volatile3 +tests\P1831R1_cpp20_volatile4 +tests\P1831R1_cpp20_volatile5 +tests\P1831R1_cpp20_volatile6 +tests\P1831R1_cpp20_volatile7 tests\P1899R3_views_stride tests\P1899R3_views_stride_death tests\P1951R1_default_arguments_pair_forward_ctor diff --git a/tests/std/tests/P1831R1_cpp20_volatile/env.lst b/tests/std/tests/P1831R1_cpp20_volatile/env.lst new file mode 100644 index 00000000000..351a8293d9d --- /dev/null +++ b/tests/std/tests/P1831R1_cpp20_volatile/env.lst @@ -0,0 +1,4 @@ +# Copyright (c) Microsoft Corporation. +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + +RUNALL_INCLUDE ..\usual_20_matrix.lst diff --git a/tests/std/tests/P1831R1_cpp20_volatile/volatile_tuple_size.test.cpp b/tests/std/tests/P1831R1_cpp20_volatile/volatile_tuple_size.test.cpp new file mode 100644 index 00000000000..85af74aa1a8 --- /dev/null +++ b/tests/std/tests/P1831R1_cpp20_volatile/volatile_tuple_size.test.cpp @@ -0,0 +1,8 @@ +// Copyright (c) Microsoft Corporation. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + +#include + +int main() { + static_assert(std::tuple_size_v> == 1); +} diff --git a/tests/std/tests/P1831R1_cpp20_volatile1/const_volatile_tuple_size.test.cpp b/tests/std/tests/P1831R1_cpp20_volatile1/const_volatile_tuple_size.test.cpp new file mode 100644 index 00000000000..1328e66fbb7 --- /dev/null +++ b/tests/std/tests/P1831R1_cpp20_volatile1/const_volatile_tuple_size.test.cpp @@ -0,0 +1,8 @@ +// Copyright (c) Microsoft Corporation. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + +#include + +int main() { + static_assert(std::tuple_size_v> == 1); +} diff --git a/tests/std/tests/P1831R1_cpp20_volatile1/env.lst b/tests/std/tests/P1831R1_cpp20_volatile1/env.lst new file mode 100644 index 00000000000..351a8293d9d --- /dev/null +++ b/tests/std/tests/P1831R1_cpp20_volatile1/env.lst @@ -0,0 +1,4 @@ +# Copyright (c) Microsoft Corporation. +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + +RUNALL_INCLUDE ..\usual_20_matrix.lst diff --git a/tests/std/tests/P1831R1_cpp20_volatile2/env.lst b/tests/std/tests/P1831R1_cpp20_volatile2/env.lst new file mode 100644 index 00000000000..351a8293d9d --- /dev/null +++ b/tests/std/tests/P1831R1_cpp20_volatile2/env.lst @@ -0,0 +1,4 @@ +# Copyright (c) Microsoft Corporation. +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + +RUNALL_INCLUDE ..\usual_20_matrix.lst diff --git a/tests/std/tests/P1831R1_cpp20_volatile2/volatile_tuple_element.test.cpp b/tests/std/tests/P1831R1_cpp20_volatile2/volatile_tuple_element.test.cpp new file mode 100644 index 00000000000..624f96aeec6 --- /dev/null +++ b/tests/std/tests/P1831R1_cpp20_volatile2/volatile_tuple_element.test.cpp @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + +#include +#include + +int main() { + static_assert(std::is_same_v>, volatile int>); +} diff --git a/tests/std/tests/P1831R1_cpp20_volatile3/const_volatile_tuple_element.test.cpp b/tests/std/tests/P1831R1_cpp20_volatile3/const_volatile_tuple_element.test.cpp new file mode 100644 index 00000000000..c2decf21ccb --- /dev/null +++ b/tests/std/tests/P1831R1_cpp20_volatile3/const_volatile_tuple_element.test.cpp @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + +#include +#include + +int main() { + static_assert(std::is_same_v>, const volatile int>); +} diff --git a/tests/std/tests/P1831R1_cpp20_volatile3/env.lst b/tests/std/tests/P1831R1_cpp20_volatile3/env.lst new file mode 100644 index 00000000000..351a8293d9d --- /dev/null +++ b/tests/std/tests/P1831R1_cpp20_volatile3/env.lst @@ -0,0 +1,4 @@ +# Copyright (c) Microsoft Corporation. +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + +RUNALL_INCLUDE ..\usual_20_matrix.lst diff --git a/tests/std/tests/P1831R1_cpp20_volatile4/env.lst b/tests/std/tests/P1831R1_cpp20_volatile4/env.lst new file mode 100644 index 00000000000..351a8293d9d --- /dev/null +++ b/tests/std/tests/P1831R1_cpp20_volatile4/env.lst @@ -0,0 +1,4 @@ +# Copyright (c) Microsoft Corporation. +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + +RUNALL_INCLUDE ..\usual_20_matrix.lst diff --git a/tests/std/tests/P1831R1_cpp20_volatile4/volatile_variant_size.test.cpp b/tests/std/tests/P1831R1_cpp20_volatile4/volatile_variant_size.test.cpp new file mode 100644 index 00000000000..fb8561214bb --- /dev/null +++ b/tests/std/tests/P1831R1_cpp20_volatile4/volatile_variant_size.test.cpp @@ -0,0 +1,8 @@ +// Copyright (c) Microsoft Corporation. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + +#include + +int main() { + static_assert(std::variant_size_v> == 1); +} diff --git a/tests/std/tests/P1831R1_cpp20_volatile5/const_volatile_variant_size.test.cpp b/tests/std/tests/P1831R1_cpp20_volatile5/const_volatile_variant_size.test.cpp new file mode 100644 index 00000000000..7fcd97efa68 --- /dev/null +++ b/tests/std/tests/P1831R1_cpp20_volatile5/const_volatile_variant_size.test.cpp @@ -0,0 +1,8 @@ +// Copyright (c) Microsoft Corporation. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + +#include + +int main() { + static_assert(std::variant_size_v> == 1); +} diff --git a/tests/std/tests/P1831R1_cpp20_volatile5/env.lst b/tests/std/tests/P1831R1_cpp20_volatile5/env.lst new file mode 100644 index 00000000000..351a8293d9d --- /dev/null +++ b/tests/std/tests/P1831R1_cpp20_volatile5/env.lst @@ -0,0 +1,4 @@ +# Copyright (c) Microsoft Corporation. +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + +RUNALL_INCLUDE ..\usual_20_matrix.lst diff --git a/tests/std/tests/P1831R1_cpp20_volatile6/env.lst b/tests/std/tests/P1831R1_cpp20_volatile6/env.lst new file mode 100644 index 00000000000..351a8293d9d --- /dev/null +++ b/tests/std/tests/P1831R1_cpp20_volatile6/env.lst @@ -0,0 +1,4 @@ +# Copyright (c) Microsoft Corporation. +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + +RUNALL_INCLUDE ..\usual_20_matrix.lst diff --git a/tests/std/tests/P1831R1_cpp20_volatile6/volatile_variant_alternative.test.cpp b/tests/std/tests/P1831R1_cpp20_volatile6/volatile_variant_alternative.test.cpp new file mode 100644 index 00000000000..c3c9cb126dc --- /dev/null +++ b/tests/std/tests/P1831R1_cpp20_volatile6/volatile_variant_alternative.test.cpp @@ -0,0 +1,8 @@ +// Copyright (c) Microsoft Corporation. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + +#include + +int main() { + static_assert(std::is_same_v>, volatile int>); +} diff --git a/tests/std/tests/P1831R1_cpp20_volatile7/const_volatile_variant_alternative.test.cpp b/tests/std/tests/P1831R1_cpp20_volatile7/const_volatile_variant_alternative.test.cpp new file mode 100644 index 00000000000..da80ba6394e --- /dev/null +++ b/tests/std/tests/P1831R1_cpp20_volatile7/const_volatile_variant_alternative.test.cpp @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + +#include +#include + +int main() { + static_assert(std::is_same_v>, const volatile int>); +} diff --git a/tests/std/tests/P1831R1_cpp20_volatile7/env.lst b/tests/std/tests/P1831R1_cpp20_volatile7/env.lst new file mode 100644 index 00000000000..351a8293d9d --- /dev/null +++ b/tests/std/tests/P1831R1_cpp20_volatile7/env.lst @@ -0,0 +1,4 @@ +# Copyright (c) Microsoft Corporation. +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + +RUNALL_INCLUDE ..\usual_20_matrix.lst diff --git a/tests/tr1/tests/tuple/test.cpp b/tests/tr1/tests/tuple/test.cpp index b2818f86bdf..3f0c76401b6 100644 --- a/tests/tr1/tests/tuple/test.cpp +++ b/tests/tr1/tests/tuple/test.cpp @@ -1,6 +1,8 @@ // Copyright (c) Microsoft Corporation. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +#define _SILENCE_CXX20_VOLATILE_DEPRECATION_WARNING + // test header #define TEST_NAME ""