Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
7e24bc4
Implement LWG-4061 Should `std::basic_format_context` be default-cons…
frederick-vs-ja Jul 5, 2024
8e56d6b
Properly test the resolution of LWG-4053 (#4748)
frederick-vs-ja Jul 5, 2024
153b940
`<xtree>`: Use scope guard for node copy failure (#4749)
frederick-vs-ja Jul 5, 2024
557eae3
Inline `_Memcmp_ranges` that is used only once (#4753)
AlexGuteniev Jul 5, 2024
9b63e8c
Updated _MSVC_STL_UPDATE to July 2024 (#4754)
ravixalgorithm Jul 5, 2024
d09326a
Inspect unwrapped iterators by `_Prefer_iterator_copies` (#4775)
AlexGuteniev Jul 5, 2024
4406e0e
P2968R2 Make std::ignore A First-Class Object (#4777)
NeilGeorge1 Jul 5, 2024
184ce39
Remove `_NODISCARD_FRIEND` workaround (#4782)
fsb4000 Jul 5, 2024
4bffb54
Implement LWG-3944 Formatters converting sequences of `char` to seque…
frederick-vs-ja Jul 5, 2024
679783a
Implement LWG-4096 `views::iota(views::iota(0))` should be rejected (…
frederick-vs-ja Jul 5, 2024
53f1faf
Implement LWG-4106 `basic_format_args` should not be default-construc…
frederick-vs-ja Jul 5, 2024
ef1d621
Always use cmpxchg16b on x64 for `atomic_ref<16 bytes>` (#4751)
StephanTLavavej Jul 5, 2024
3962da0
Toolset update: VS 2022 17.11 Preview 3 (#4824)
StephanTLavavej Jul 11, 2024
39dd503
`<numeric>`: check for gcd / lcm overflows (#4776)
AlexGuteniev Jul 11, 2024
a395844
Implement LWG-4083 `views::as_rvalue` should reject non-input ranges …
frederick-vs-ja Jul 11, 2024
de1eb6f
Implement LWG-4074 `compatible-joinable-ranges` is underconstrained (…
frederick-vs-ja Jul 11, 2024
5236e38
Implement LWG-4098 `views::adjacent<0>` should reject non-forward ran…
frederick-vs-ja Jul 11, 2024
0207572
Implement P2997R1 Removing The Common Reference Requirement From The …
frederick-vs-ja Jul 11, 2024
afb1fc1
Fix `<bitset>` benchmark correctness (#4817)
AlexGuteniev Jul 11, 2024
0586819
Fewer allocations to put smaller bitset to stream (#4818)
AlexGuteniev Jul 11, 2024
ecbc1ef
Use `requires`-clauses for `pair` and `tuple` since C++20 (#4819)
frederick-vs-ja Jul 11, 2024
baacc79
Merge branch 'main' into merge-flat_map
StephanTLavavej Jul 11, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

cmake_minimum_required(VERSION 3.28.0)
cmake_minimum_required(VERSION 3.29.0)

set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
project(msvc_standard_libraries LANGUAGES CXX)
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,11 @@ 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.11 Preview 2 or later.
1. Install Visual Studio 2022 17.11 Preview 3 or later.
* Select "Windows 11 SDK (10.0.22621.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.28.0 or later, and [Ninja][] 1.11.0 or later.
* Otherwise, install [CMake][] 3.29.0 or later, and [Ninja][] 1.11.0 or later.
* 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`.
Expand All @@ -156,11 +156,11 @@ 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.11 Preview 2 or later.
1. Install Visual Studio 2022 17.11 Preview 3 or later.
* Select "Windows 11 SDK (10.0.22621.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.28.0 or later, and [Ninja][] 1.11.0 or later.
* Otherwise, install [CMake][] 3.29.0 or later, and [Ninja][] 1.11.0 or later.
* 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.
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-2024-06-11T1315-Pool'
value: 'StlBuild-2024-07-09T1614-Pool'
readonly: true
- name: poolDemands
value: 'EnableSpotVM -equals false'
Expand Down
2 changes: 1 addition & 1 deletion azure-devops/create-1es-hosted-pool.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ $ErrorActionPreference = 'Stop'

$CurrentDate = Get-Date

$Location = 'eastus'
$Location = 'eastus2'
$VMSize = 'Standard_D32ads_v5'
$ProtoVMName = 'PROTOTYPE'
$ImagePublisher = 'MicrosoftWindowsServer'
Expand Down
2 changes: 1 addition & 1 deletion azure-devops/provision-image.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ foreach ($workload in $VisualStudioWorkloads) {
}

# https://github.com/PowerShell/PowerShell/releases/latest
$PowerShellUrl = 'https://github.com/PowerShell/PowerShell/releases/download/v7.4.2/PowerShell-7.4.2-win-x64.msi'
$PowerShellUrl = 'https://github.com/PowerShell/PowerShell/releases/download/v7.4.3/PowerShell-7.4.3-win-x64.msi'
$PowerShellArgs = @('/quiet', '/norestart')

$PythonUrl = 'https://www.python.org/ftp/python/3.12.4/python-3.12.4-amd64.exe'
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

cmake_minimum_required(VERSION 3.28.0)
cmake_minimum_required(VERSION 3.29.0)
project(msvc_standard_libraries_benchmarks LANGUAGES CXX)

if(DEFINED STL_BINARY_DIR)
Expand Down
31 changes: 21 additions & 10 deletions benchmarks/src/bitset_to_string.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,41 +13,52 @@
using namespace std;

namespace {
const auto random_bits = [] {
template <size_t Elems>
auto random_bits_init() {
mt19937_64 rnd{};
array<uint64_t, 32> arr;
array<uint64_t, Elems> arr;
for (auto& d : arr) {
d = rnd();
}
return arr;
}();
}

template <size_t Elems = 32>
const auto random_bits = random_bits_init<Elems>();

template <size_t N, class charT>
void BM_bitset_to_string(benchmark::State& state) {
static_assert(N <= 64);

for (auto _ : state) {
for (const auto& bits : random_bits) {
for (const auto& bits : random_bits<>) {
benchmark::DoNotOptimize(bits);
bitset<N> bs{bits};
benchmark::DoNotOptimize(bs.to_string<charT>());
}
}
}

template <class charT>
template <size_t N, class charT>
void BM_bitset_to_string_large_single(benchmark::State& state) {
const auto large_bitset = bit_cast<bitset<CHAR_BIT * sizeof(random_bits)>>(random_bits);
static_assert(N % 64 == 0 && N >= 64);
const auto& bitset_data = random_bits<N / 64>;

const auto large_bitset = bit_cast<bitset<N>>(bitset_data);
for (auto _ : state) {
benchmark::DoNotOptimize(large_bitset);
benchmark::DoNotOptimize(large_bitset.to_string<charT>());
}
}
} // namespace

BENCHMARK(BM_bitset_to_string<15, char>);
BENCHMARK(BM_bitset_to_string<64, char>);
BENCHMARK(BM_bitset_to_string<512, char>);
BENCHMARK(BM_bitset_to_string_large_single<char>);
BENCHMARK(BM_bitset_to_string_large_single<512, char>);
BENCHMARK(BM_bitset_to_string_large_single<2048, char>);
BENCHMARK(BM_bitset_to_string<7, wchar_t>);
BENCHMARK(BM_bitset_to_string<64, wchar_t>);
BENCHMARK(BM_bitset_to_string<512, wchar_t>);
BENCHMARK(BM_bitset_to_string_large_single<wchar_t>);
BENCHMARK(BM_bitset_to_string_large_single<512, wchar_t>);
BENCHMARK(BM_bitset_to_string_large_single<2048, wchar_t>);

BENCHMARK_MAIN();
5 changes: 2 additions & 3 deletions stl/inc/__msvc_bit_utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -300,9 +300,8 @@ _NODISCARD int _Checked_x86_x64_countr_zero(const _Ty _Val) noexcept {

#endif // _HAS_TZCNT_BSF_INTRINSICS

// TRANSITION, remove `_MSC_VER > 1940` check after MSVC-internal toolset update
#if (defined(_M_IX86) || defined(_M_X64) || (defined(_M_ARM64) && _MSC_VER > 1940)) && !defined(_M_CEE_PURE) \
&& !defined(__CUDACC__) && !defined(__INTEL_COMPILER)
#if (defined(_M_IX86) || defined(_M_X64) || defined(_M_ARM64)) && !defined(_M_CEE_PURE) && !defined(__CUDACC__) \
&& !defined(__INTEL_COMPILER)
#define _HAS_POPCNT_INTRINSICS 1
#if defined(__AVX__) || defined(_M_ARM64) || defined(_M_ARM64EC)
#define _POPCNT_INTRINSICS_ALWAYS_AVAILABLE 1
Expand Down
35 changes: 35 additions & 0 deletions stl/inc/__msvc_formatter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,41 @@ struct formatter<basic_string_view<_CharT, _Traits>, _CharT>
};

#if _HAS_CXX23
template <>
struct formatter<char*, wchar_t> {
formatter() = delete;
formatter(const formatter&) = delete;
formatter& operator=(const formatter&) = delete;
};

template <>
struct formatter<const char*, wchar_t> {
formatter() = delete;
formatter(const formatter&) = delete;
formatter& operator=(const formatter&) = delete;
};

template <size_t _Size>
struct formatter<char[_Size], wchar_t> {
formatter() = delete;
formatter(const formatter&) = delete;
formatter& operator=(const formatter&) = delete;
};

template <class _Traits, class _Allocator>
struct formatter<basic_string<char, _Traits, _Allocator>, wchar_t> {
formatter() = delete;
formatter(const formatter&) = delete;
formatter& operator=(const formatter&) = delete;
};

template <class _Traits>
struct formatter<basic_string_view<char, _Traits>, wchar_t> {
formatter() = delete;
formatter(const formatter&) = delete;
formatter& operator=(const formatter&) = delete;
};

_EXPORT_STD enum class range_format { disabled, map, set, sequence, string, debug_string };

template <class _Ty>
Expand Down
Loading