Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Toolset update: VS 2022 17.8 Preview 3 #4083

Merged
merged 10 commits into from
Oct 14, 2023
12 changes: 5 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,13 +141,12 @@ Just try to follow these rules, so we can spend more time fixing bugs and implem

# How To Build With The Visual Studio IDE

1. Install Visual Studio 2022 17.8 Preview 2 or later.
1. Install Visual Studio 2022 17.8 Preview 3 or later.
* Select "Windows 11 SDK (10.0.22000.0)" in the VS Installer.
* We recommend selecting "C++ CMake tools for Windows" in the VS Installer.
This will ensure that you're using supported versions of CMake and Ninja.
* Otherwise, install [CMake][] 3.27.0 or later, and [Ninja][] 1.11.0 or later.
* We recommend selecting "Python 3 64-bit" in the VS Installer.
* Otherwise, make sure [Python][] 3.9 or later is available to CMake.
* Make sure [Python][] 3.12 or later is available to CMake.
2. Open Visual Studio, and choose the "Clone or check out code" option. Enter the URL of this repository,
`https://github.com/microsoft/STL`.
3. Open a terminal in the IDE with `` Ctrl + ` `` (by default) or press on "View" in the top bar, and then "Terminal".
Expand All @@ -157,13 +156,12 @@ Just try to follow these rules, so we can spend more time fixing bugs and implem

# How To Build With A Native Tools Command Prompt

1. Install Visual Studio 2022 17.8 Preview 2 or later.
1. Install Visual Studio 2022 17.8 Preview 3 or later.
* Select "Windows 11 SDK (10.0.22000.0)" in the VS Installer.
* We recommend selecting "C++ CMake tools for Windows" in the VS Installer.
This will ensure that you're using supported versions of CMake and Ninja.
* Otherwise, install [CMake][] 3.27.0 or later, and [Ninja][] 1.11.0 or later.
* We recommend selecting "Python 3 64-bit" in the VS Installer.
* Otherwise, make sure [Python][] 3.9 or later is available to CMake.
* Make sure [Python][] 3.12 or later is available to CMake.
2. Open a command prompt.
3. Change directories to a location where you'd like a clone of this STL repository.
4. `git clone https://github.com/microsoft/STL --recurse-submodules`
Expand Down Expand Up @@ -232,7 +230,7 @@ C:\Users\username\Desktop>dumpbin /DEPENDENTS .\example.exe | findstr msvcp
# How To Run The Tests With A Native Tools Command Prompt

1. Follow either [How To Build With A Native Tools Command Prompt][] or [How To Build With The Visual Studio IDE][].
2. Acquire [Python][] 3.9 or newer and have it on the `PATH` (or run it directly using its absolute or relative path).
2. Acquire [Python][] 3.12 or newer and have it on the `PATH` (or run it directly using its absolute or relative path).
3. Have LLVM's `bin` directory on the `PATH` (so `clang-cl.exe` is available).
* We recommend selecting "C++ Clang tools for Windows" in the VS Installer. This will automatically add LLVM to the
`PATH` of the x86 and x64 Native Tools Command Prompts, and will ensure that you're using a supported version.
Expand Down
2 changes: 1 addition & 1 deletion azure-devops/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

variables:
- name: poolName
value: 'StlBuild-2023-09-14T1251-Pool'
value: 'StlBuild-2023-10-10T1443-Pool'
readonly: true
- name: poolDemands
value: 'EnableSpotVM -equals true'
Expand Down
4 changes: 2 additions & 2 deletions azure-devops/provision-image.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ if ([string]::IsNullOrEmpty($AdminUserPassword)) {
$PsExecPath = Join-Path $ExtractedPsToolsPath 'PsExec64.exe'

# https://github.com/PowerShell/PowerShell/releases/latest
$PowerShellZipUrl = 'https://github.com/PowerShell/PowerShell/releases/download/v7.3.6/PowerShell-7.3.6-win-x64.zip'
$PowerShellZipUrl = 'https://github.com/PowerShell/PowerShell/releases/download/v7.3.8/PowerShell-7.3.8-win-x64.zip'
Write-Host "Downloading: $PowerShellZipUrl"
$ExtractedPowerShellPath = DownloadAndExtractZip -Url $PowerShellZipUrl
$PwshPath = Join-Path $ExtractedPowerShellPath 'pwsh.exe'
Expand Down Expand Up @@ -136,7 +136,7 @@ $Workloads = @(
)

$VisualStudioBootstrapperUrl = 'https://aka.ms/vs/17/pre/vs_enterprise.exe'
$PythonUrl = 'https://www.python.org/ftp/python/3.11.5/python-3.11.5-amd64.exe'
$PythonUrl = 'https://www.python.org/ftp/python/3.12.0/python-3.12.0-amd64.exe'

$CudaUrl = 'https://developer.download.nvidia.com/compute/cuda/11.6.0/local_installers/cuda_11.6.0_511.23_windows.exe'

Expand Down
3 changes: 0 additions & 3 deletions stl/inc/charconv
Original file line number Diff line number Diff line change
Expand Up @@ -1026,10 +1026,7 @@ _NODISCARD inline uint64_t _Right_shift_with_rounding(
constexpr uint32_t _Total_number_of_bits = 64;
if (_Shift >= _Total_number_of_bits) {
if (_Shift == _Total_number_of_bits) {
#pragma warning(push)
#pragma warning(disable : 26454) // TRANSITION, VSO-1826196
constexpr uint64_t _Extra_bits_mask = (1ULL << (_Total_number_of_bits - 1)) - 1;
#pragma warning(pop)
constexpr uint64_t _Round_bit_mask = (1ULL << (_Total_number_of_bits - 1));

const bool _Round_bit = (_Value & _Round_bit_mask) != 0;
Expand Down
6 changes: 1 addition & 5 deletions stl/inc/xutility
Original file line number Diff line number Diff line change
Expand Up @@ -5912,11 +5912,7 @@ namespace ranges {
return _RANGES next(_STD move(_First), _Result - _First_ptr);
}
#else // ^^^ _USE_STD_VECTOR_ALGORITHMS / !_USE_STD_VECTOR_ALGORITHMS vvv
if constexpr (sizeof(_Iter_value_t<_It>) == 1
#if defined(_M_ARM64) || defined(_M_ARM64EC) // TRANSITION, VSO-1538014 : memchr inspects bytes after the match
&& _Is_sized
#endif // ^^^ workaround ^^^
) {
if constexpr (sizeof(_Iter_value_t<_It>) == 1) {
size_t _Count;
if constexpr (_Is_sized) {
_Count = static_cast<size_t>(_Last - _First);
Expand Down
2 changes: 1 addition & 1 deletion tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ add_subdirectory(tr1)
# chance to add to the config map and test directory global properties.
add_subdirectory(utils/stl-lit)

find_package(Python "3.9" REQUIRED COMPONENTS Interpreter)
find_package(Python "3.12" REQUIRED COMPONENTS Interpreter)

if(NOT DEFINED LIT_FLAGS)
list(APPEND LIT_FLAGS "-o" "${CMAKE_CURRENT_BINARY_DIR}/test_results.json")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,6 @@ void extended_math_functions_test(T value) {
(void) tanh(value);
}

// TRANSITION, VSO-251998
StephanTLavavej marked this conversation as resolved.
Show resolved Hide resolved
// cbegin() calls begin() fully qualified, so cannot
// find valarray non-member begin().

Expand Down
8 changes: 6 additions & 2 deletions tests/std/tests/VSO_0105317_expression_sfinae/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,6 @@ STATIC_ASSERT(is_nothrow_invocable_r_v<Puppy, Kitty, int>);
STATIC_ASSERT(is_invocable_r_v<Zebra, Kitty, int>);
STATIC_ASSERT(!is_nothrow_invocable_r_v<Zebra, Kitty, int>);

#if defined(__clang__) || defined(__EDG__) // TRANSITION, VSO-1026729
// Defend against regression of VSO-963790, in which is_invocable_r mishandles non-movable return types
struct NonMovable {
NonMovable(NonMovable&&) = delete;
Expand All @@ -626,7 +625,9 @@ NonMovable getNonMovable() noexcept(Nothrow);
STATIC_ASSERT(is_invocable_r_v<NonMovable, decltype(&getNonMovable<false>)>);
STATIC_ASSERT(is_invocable_r_v<NonMovable, decltype(&getNonMovable<true>)>);
STATIC_ASSERT(!is_nothrow_invocable_r_v<NonMovable, decltype(&getNonMovable<false>)>);
#if defined(__clang__) || defined(__EDG__) // TRANSITION, VSO-1899423
STATIC_ASSERT(is_nothrow_invocable_r_v<NonMovable, decltype(&getNonMovable<true>)>);
#endif // ^^^ no workaround ^^^

template <bool Nothrow>
struct ConvertsToNonMovable {
Expand All @@ -636,15 +637,18 @@ struct ConvertsToNonMovable {
template <bool Nothrow, bool NothrowReturn>
ConvertsToNonMovable<NothrowReturn> getConvertsToNonMovable() noexcept(Nothrow);

#if defined(__clang__) || defined(__EDG__) // TRANSITION, VSO-1899423
STATIC_ASSERT(is_invocable_r_v<NonMovable, decltype(&getConvertsToNonMovable<false, false>)>);
STATIC_ASSERT(is_invocable_r_v<NonMovable, decltype(&getConvertsToNonMovable<false, true>)>);
STATIC_ASSERT(is_invocable_r_v<NonMovable, decltype(&getConvertsToNonMovable<true, false>)>);
STATIC_ASSERT(is_invocable_r_v<NonMovable, decltype(&getConvertsToNonMovable<true, true>)>);
#endif // ^^^ no workaround ^^^
STATIC_ASSERT(!is_nothrow_invocable_r_v<NonMovable, decltype(&getConvertsToNonMovable<false, false>)>);
STATIC_ASSERT(!is_nothrow_invocable_r_v<NonMovable, decltype(&getConvertsToNonMovable<false, true>)>);
STATIC_ASSERT(!is_nothrow_invocable_r_v<NonMovable, decltype(&getConvertsToNonMovable<true, false>)>);
#if defined(__clang__) || defined(__EDG__) // TRANSITION, VSO-1899423
STATIC_ASSERT(is_nothrow_invocable_r_v<NonMovable, decltype(&getConvertsToNonMovable<true, true>)>);
#endif // TRANSITION, VSO-1026729
#endif // ^^^ no workaround ^^^
#endif // _HAS_CXX17


Expand Down
13 changes: 8 additions & 5 deletions tests/tr1/tests/memory1/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@
#include <sstream>
#include <string>

// TRANSITION, VSO-1281038: False C6287 for C++20 synthesized operators
#pragma warning(disable : 6287) // Redundant code: the left and right sub-expressions are identical.

static void t_bad_weak_ptr() { // test bad_weak_ptr
STD bad_weak_ptr ptr;
STD exception* eptr = &ptr;
Expand Down Expand Up @@ -515,8 +512,14 @@ static void t_shared_ptr() { // test shared_ptr interface
STD shared_ptr<X0> sp0(it0);
STD shared_ptr<X0> sp1(it1);
STD shared_ptr<X0> sp2(sp1);
CHECK(!(sp0 == sp1) && sp0 != sp1 && sp1 == sp2 && !(sp1 != sp2));
CHECK(!(sp1 < sp2) && !(sp2 < sp1));

CHECK(!(sp0 == sp1));
CHECK(sp0 != sp1);
CHECK(sp1 == sp2);
CHECK(!(sp1 != sp2));

CHECK(!(sp1 < sp2));
CHECK(!(sp2 < sp1));

CHECK(sp1 <= sp2);
CHECK(!(sp2 > sp1));
Expand Down