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

Updated the fork to the current main. #22

Merged
merged 56 commits into from
Jan 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
c1c21e9
Contributor project automations via workflows (#2584)
sam20908 Oct 26, 2022
705265e
Properly constrain `_Movable_box`'s copy constructors (#3171)
CaseyCarter Oct 26, 2022
71d5417
Cleanup tests/P0024R2_parallel_algorithms_is_partitioned (#3174)
CaseyCarter Oct 26, 2022
82837b7
Fix `error_category` regression with Boost.System (#3176)
StephanTLavavej Oct 26, 2022
296e840
Various cleanups (#3177)
StephanTLavavej Oct 26, 2022
e97bb2b
Miscellaneous Cleanups (#3178)
CaseyCarter Oct 26, 2022
e9c3b55
`<locale>`: Double-checked locking for locale::classic (#3048)
MattStephanson Oct 27, 2022
99e4c99
README.md: Adjust Compiler Explorer link wording (#3180)
Alcaro Oct 27, 2022
48eb4a4
add support for [[msvc::intrinsic]] (#3182)
cdacamar Oct 27, 2022
c873cf0
rename `<stdatomic.h>` to `<__msvc_cxx_stdatomic.h>` (#3183)
barcharcraz Oct 27, 2022
ea09254
Enable `/clr` C++20 support (#3194)
StephanTLavavej Nov 8, 2022
f58deab
Toolset update: VS 2022 17.5 Preview 1, Python 3.11.0 (#3202)
StephanTLavavej Nov 11, 2022
c550bd0
Implement P2467R1 `ios_base::noreplace`: Exclusive Mode For `fstream`…
Atari2 Nov 11, 2022
0743f64
enable P0943R6_stdatomic_h test for clang (#3186)
fsb4000 Nov 11, 2022
0b13eb0
P2278R4: `cbegin` should always return a constant iterator ("Ranges" …
JMazurkiewicz Nov 11, 2022
53cdc19
<yvals_core.h>: Update _MSVC_STL_UPDATE to November 2022 (#3191)
danger-ahead Nov 11, 2022
29ac086
Change an error message in `<__msvc_cxx_stdatomic.hpp>` (#3192)
fsb4000 Nov 11, 2022
0098818
[vscode settings] add `git.ignoredRepositories` (#3196)
strega-nil-ms Nov 11, 2022
2127d8b
Implement LWG-3823 Unnecessary precondition for `is_aggregate` (worka…
frederick-vs-ja Nov 18, 2022
8ffd4a4
Standard Library Modules: Fix `time_put<wchar_t>` linker errors (#3232)
StephanTLavavej Nov 18, 2022
47c90ae
Standard Library Modules: Fix spurious `_Init_locks` dllexport (#3233)
StephanTLavavej Nov 18, 2022
299abb0
Don't rely on SSO zeroing in `basic_string::_Construct` (#3235)
CaseyCarter Nov 19, 2022
10e1366
LWG-3515: [stacktrace.basic.nonmem]: `operator<<` should be less temp…
JMazurkiewicz Nov 19, 2022
e28f956
Update comments for approved LWG issues (#3238)
CaseyCarter Nov 19, 2022
26a1f76
ppltasks.cpp: Fix bincompat for VS 2015 (#3255)
StephanTLavavej Dec 2, 2022
ac11067
Enable `/clr` C++20 `<coroutine>` support (#3201)
StephanTLavavej Dec 5, 2022
e5b008c
fix and rename `_Within_limits`, add tests (#3247)
strega-nil-ms Dec 6, 2022
fba515c
Add error_code, error_category support to visualizer (#3204)
cmazakas Dec 6, 2022
be29af2
standardize `^^^ x / !x vvv` comments (#3208)
fsb4000 Dec 6, 2022
214e014
P2602R2 Poison Pills Are Too Toxic (#3215)
CaseyCarter Dec 6, 2022
0a1c6c4
Implement LWG-3545 `std::pointer_traits` should be SFINAE-friendly (#…
frederick-vs-ja Dec 6, 2022
aeed392
fix stl.natvis `std::optional<*>` (#3243)
strega-nil-ms Dec 6, 2022
8086a2b
`<xlocale>`: Avoid allocation when comparing two `locale` values (#3250)
frederick-vs-ja Dec 6, 2022
54ac725
`<__msvc_int128.hpp>`: Move UDLs to test code (#3252)
frederick-vs-ja Dec 6, 2022
2b3a09f
Convert arguments to double in `_GENERIC_MATH2_BASE` (#3253)
CaseyCarter Dec 6, 2022
3de573a
Cleanup for `operator!=` and `operator==` with reversed order (#3256)
frederick-vs-ja Dec 6, 2022
298d586
Implement P2167R3 Improving `boolean-testable` Usage (for comparison …
frederick-vs-ja Dec 6, 2022
cf34f45
Implement LWG-3646 `std::ranges::view_interface::size` returns a sign…
frederick-vs-ja Dec 6, 2022
6059e75
`<algorithm>`: `count()` could use vectorization in C++14/C++17 (#3262)
fsb4000 Dec 6, 2022
66c528a
Update _MSVC_STL_UPDATE to December 2022 (#3264)
AmrElsayyad Dec 6, 2022
7164d1c
Implement LWG-3746 `optional`'s spaceship with `U` with a type derive…
frederick-vs-ja Dec 6, 2022
4483e87
Implement LWG-3717 `common_view::end` should improve `random_access_r…
frederick-vs-ja Dec 6, 2022
67d89ce
Toolset update: VS 2022 17.5 Preview 2 (#3288)
StephanTLavavej Dec 15, 2022
faaf094
Re-enable ASAN string annotations (#3164)
strega-nil-ms Dec 15, 2022
8f5de32
Update `source_location` to use `__builtin_FUNCSIG` (#3206)
SuperWig Dec 15, 2022
032120d
P2278R4: `views::as_const` (#3234)
JMazurkiewicz Dec 15, 2022
c3217d2
`<algorithm>`: `find`/`count` vectorize moar (#3267)
strega-nil-ms Dec 15, 2022
f1e026f
P1223R5: find_last, et al. (#3268)
SuperWig Dec 15, 2022
a66a092
Implement LWG-3743 `ranges::to`'s `reserve` may be ill-formed (#3269)
fsb4000 Dec 15, 2022
cae6660
Qualify calls to helpers that are in both _STD and _RANGES (#3270)
CaseyCarter Dec 15, 2022
d8ef034
Implement LWG-3629 `make_error_code` and `make_error_condition` are c…
frederick-vs-ja Dec 15, 2022
70575d5
Implement LWG-3594 `inout_ptr` - inconsistent `release()` in destruct…
fsb4000 Dec 15, 2022
c53fa69
Use emplace_front in <experimental/filesystem> (#3279)
AreaZR Dec 15, 2022
435250b
Add checks for invalid iterator when _ITERATOR_DEBUG_LEVEL is non-zer…
rogerorr Dec 15, 2022
34b296f
Enhancements for `future` and `shared_future` (#3284)
frederick-vs-ja Dec 15, 2022
8ddf4da
Don't use `<intrin0.h>` with Clang (#3285)
CaseyCarter Dec 15, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
68 changes: 68 additions & 0 deletions .github/workflows/move-ready-for-review-prs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

name: Move PR To Initial Review
on:
issue_comment:
types: [created]
branch:
- main

jobs:
move-pr-to-initial-review:
if: >
github.event.issue.pull_request
&& github.event.comment.user.login == github.event.issue.user.login
&& contains(github.event.comment.body, '/pr review')
runs-on: ubuntu-latest
steps:
- name: Move To Initial Review
uses: actions/github-script@v6
with:
script: |
// Find "Code Reviews" project manually by name matching
// This avoids hardcoding the project ID
const projects = await github.paginate(github.rest.projects.listForRepo, {
owner: context.repo.owner,
repo: context.repo.repo,
});
const code_reviews = projects.find(project => project.name === 'Code Reviews');
if (!code_reviews) {
console.error("'Code Reviews' project not found!");
return;
}

// Find "Initial Review" column manually by name matching
// This assumes the card is in "Work In Progress" column
// This avoids hardcoding the column ID and card ID
const columns = await github.paginate(github.rest.projects.listColumns, {
project_id: code_reviews.id,
});

const work_in_progress = columns.find(column => column.name === 'Work In Progress');
if (!work_in_progress) {
console.error("'Work In Progress' column not found!");
return;
}

const initial_review = columns.find(column => column.name === 'Initial Review');
if (!initial_review) {
console.error("'Initial Review' column not found!");
return;
}

const pr_card = await github.paginate(github.rest.projects.listCards, {
column_id: work_in_progress.id,
}).then(cards => cards.find(card => card.content_url === context.payload.issue.url));
if (!pr_card) {
console.error("Corresponding card for PR not found!");
return;
}

github.rest.projects.moveCard({
card_id: pr_card.id,
position: 'bottom',
column_id: initial_review.id,
}).catch(error => {
console.error(`Error occurred while moving card to 'Initial Review': ${error}`);
});
73 changes: 73 additions & 0 deletions .github/workflows/move-work-in-progress-prs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

name: Move PR To Work In Progress
on:
issue_comment:
types: [created]
branch:
- main

jobs:
move-pr-to-wip:
if: >
github.event.issue.pull_request
&& github.event.comment.user.login == github.event.issue.user.login
&& contains(github.event.comment.body, '/pr wip')
runs-on: ubuntu-latest
steps:
- name: Move To Work In Progress
uses: actions/github-script@v6
with:
script: |
// Find "Code Reviews" project manually by name matching
// This avoids hardcoding the project ID
const projects = await github.paginate(github.rest.projects.listForRepo, {
owner: context.repo.owner,
repo: context.repo.repo,
});
const code_reviews = projects.find(project => project.name === 'Code Reviews');
if (!code_reviews) {
console.error("'Code Reviews' project not found!");
return;
}

// Find "Work In Progress" column manually by name matching
// Also find the card of the PR in either "Initial Review" or "Final Review"
// This avoids hardcoding the column ID and card ID
const columns = await github.paginate(github.rest.projects.listColumns, {
project_id: code_reviews.id,
});

const work_in_progress = columns.find(column => column.name === 'Work In Progress');
if (!work_in_progress) {
console.error("'Work In Progress' column not found!");
return;
}

const move_card_in_column = async (column) => {
const cards = await github.paginate(github.rest.projects.listCards, {
column_id: column.id,
});

const pr_card = cards.find(card => card.content_url === context.payload.issue.url);
if (!pr_card) {
return; // the PR card is not in this column
}

await github.rest.projects.moveCard({
card_id: pr_card.id,
position: 'bottom',
column_id: work_in_progress.id,
});
};

columns.forEach(column => {
if (column.name !== 'Initial Review' && column.name !== 'Final Review') {
return; // no reason to search through other columns and avoids unnecessary API calls
}

move_card_in_column(column).catch(error => {
console.error(`Error occurred while moving card to 'Work In Progress': ${error}`);
});
});
9 changes: 7 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,18 @@
"files.eol": "\r\n",
"files.exclude": {
"benchmarks/google-benchmark": true,
"boost-math": true,
"llvm-project": true,
"stl/msbuild": true,
"boost-math": true
"stl/msbuild": true
},
"files.insertFinalNewline": true,
"files.trimFinalNewlines": true,
"files.trimTrailingWhitespace": true,
"git.ignoredRepositories": [
"benchmarks/google-benchmark",
"boost-math",
"llvm-project"
],
"python.analysis.extraPaths": [
"./llvm-project/libcxx/utils",
"./llvm-project/llvm/utils/lit",
Expand Down
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

cmake_minimum_required(VERSION 3.24)
cmake_minimum_required(VERSION 3.25)

# TRANSITION, CMake-24249
cmake_policy(SET CMP0141 OLD)

set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
project(msvc_standard_libraries LANGUAGES CXX)

Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ reproducing the bug.

* You should be reasonably confident that you're looking at an actual implementation bug, instead of undefined behavior
or surprising-yet-Standard behavior. Comparing against other implementations can help (but remember that implementations
can differ while conforming to the Standard); try Godbolt's [Compiler Explorer][]. If you still aren't
can differ while conforming to the Standard); try [Compiler Explorer][]. If you still aren't
sure, ask the nearest C++ expert.

* You should prepare a self-contained command-line test case, ideally as small as possible. We need a source file, a
Expand All @@ -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.4 Preview 3 or later.
1. Install Visual Studio 2022 17.5 Preview 2 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.24 or later, and [Ninja][] 1.11.0 or later.
* Otherwise, install [CMake][] 3.25 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.
2. Open Visual Studio, and choose the "Clone or check out code" option. Enter the URL of this repository,
Expand All @@ -157,11 +157,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.4 Preview 3 or later.
1. Install Visual Studio 2022 17.5 Preview 2 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.24 or later, and [Ninja][] 1.11.0 or later.
* Otherwise, install [CMake][] 3.25 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.
2. Open a command prompt.
Expand Down
2 changes: 0 additions & 2 deletions azure-devops/cmake-configure-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ steps:
cmake ${{ parameters.cmakeAdditionalFlags}} -G Ninja ^
-DCMAKE_CXX_COMPILER=cl ^
-DCMAKE_BUILD_TYPE=Release ^
-DLIT_FLAGS=$(litFlags) ^
-DSTL_USE_ANALYZE=ON ^
-DSTL_BINARY_DIR=$(${{ parameters.buildOutputLocationVar }}) ^
-S $(Build.SourcesDirectory)/benchmarks -B $(${{ parameters.benchmarkBuildOutputLocationVar }})
displayName: 'Configure the benchmarks'
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.2.6/PowerShell-7.2.6-win-x64.zip'
$PowerShellZipUrl = 'https://github.com/PowerShell/PowerShell/releases/download/v7.3.1/PowerShell-7.3.1-win-x64.zip'
Write-Host "Downloading: $PowerShellZipUrl"
$ExtractedPowerShellPath = DownloadAndExtractZip -Url $PowerShellZipUrl
$PwshPath = Join-Path $ExtractedPowerShellPath 'pwsh.exe'
Expand Down Expand Up @@ -141,7 +141,7 @@ $Workloads = @(
$ReleaseInPath = 'Preview'
$Sku = 'Enterprise'
$VisualStudioBootstrapperUrl = 'https://aka.ms/vs/17/pre/vs_enterprise.exe'
$PythonUrl = 'https://www.python.org/ftp/python/3.10.8/python-3.10.8-amd64.exe'
$PythonUrl = 'https://www.python.org/ftp/python/3.11.1/python-3.11.1-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
2 changes: 1 addition & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ variables:
benchmarkBuildOutputLocation: 'D:\benchmark'

pool:
name: 'StlBuild-2022-10-11T1916-Pool'
name: 'StlBuild-2022-12-13T1747-Pool'
demands: EnableSpotVM -equals true

pr:
Expand Down
5 changes: 3 additions & 2 deletions 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.24)
cmake_minimum_required(VERSION 3.25)
project(msvc_standard_libraries_benchmarks LANGUAGES CXX)

if(DEFINED STL_BINARY_DIR)
Expand Down Expand Up @@ -105,5 +105,6 @@ function(add_benchmark name)
target_compile_definitions(benchmark-${name} PRIVATE BENCHMARK_STATIC_DEFINE)
endfunction()

add_benchmark(std_copy src/std_copy.cpp)
add_benchmark(locale_classic src/locale_classic.cpp)
add_benchmark(random_integer_generation src/random_integer_generation.cpp)
add_benchmark(std_copy src/std_copy.cpp)
16 changes: 16 additions & 0 deletions benchmarks/src/locale_classic.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// Copyright (c) Microsoft Corporation.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

#include <benchmark/benchmark.h>
#include <locale>
using namespace std;

// GH-3048 <locale>: Double-checked locking for locale::classic
static void BM_locale_classic(benchmark::State& state) {
for (auto _ : state) {
benchmark::DoNotOptimize(locale::classic());
}
}
BENCHMARK(BM_locale_classic);

BENCHMARK_MAIN();
3 changes: 2 additions & 1 deletion stl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@
set(HEADERS
${CMAKE_CURRENT_LIST_DIR}/inc/__msvc_all_public_headers.hpp
${CMAKE_CURRENT_LIST_DIR}/inc/__msvc_chrono.hpp
${CMAKE_CURRENT_LIST_DIR}/inc/__msvc_cxx_stdatomic.hpp
${CMAKE_CURRENT_LIST_DIR}/inc/__msvc_format_ucd_tables.hpp
${CMAKE_CURRENT_LIST_DIR}/inc/__msvc_int128.hpp
${CMAKE_CURRENT_LIST_DIR}/inc/__msvc_iter_core.hpp
${CMAKE_CURRENT_LIST_DIR}/inc/__msvc_sanitizer_annotate_container.hpp
${CMAKE_CURRENT_LIST_DIR}/inc/__msvc_system_error_abi.hpp
${CMAKE_CURRENT_LIST_DIR}/inc/__msvc_tzdb.hpp
${CMAKE_CURRENT_LIST_DIR}/inc/__msvc_xlocinfo_types.hpp
Expand Down Expand Up @@ -191,7 +193,6 @@ set(HEADERS
${CMAKE_CURRENT_LIST_DIR}/inc/sstream
${CMAKE_CURRENT_LIST_DIR}/inc/stack
${CMAKE_CURRENT_LIST_DIR}/inc/stacktrace
${CMAKE_CURRENT_LIST_DIR}/inc/stdatomic.h
${CMAKE_CURRENT_LIST_DIR}/inc/stdexcept
${CMAKE_CURRENT_LIST_DIR}/inc/stop_token
${CMAKE_CURRENT_LIST_DIR}/inc/streambuf
Expand Down
28 changes: 23 additions & 5 deletions stl/debugger/STL.natvis
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,26 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
</Type>


<Type Name="std::error_category">
<DisplayString>[{name(),sb}]</DisplayString>
<Expand>
<Synthetic Name="hint">
<DisplayString>Enable "Allow Function Calls In Value Formatting" if you see "???" here</DisplayString>
</Synthetic>
</Expand>
</Type>

<Type Name="std::error_code">
<DisplayString>{{ value={_Myval}, category={*_Mycat} }}</DisplayString>
<Expand>
<Synthetic Name="hint">
<DisplayString>Enable "Allow Function Calls In Value Formatting" if you see "???" here</DisplayString>
</Synthetic>
<Item Name="[value]">_Myval</Item>
<Item Name="[category]">_Mycat</Item>
</Expand>
</Type>

<Type Name="std::exception_ptr">
<CustomVisualizer Condition="_Data1 != 0" VisualizerId="CEB58A03-E78D-4D19-9AE7-4738E200649E" />
<DisplayString Condition="_Data1 == 0">null</DisplayString>
Expand Down Expand Up @@ -104,12 +124,10 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
</Type>

<Type Name="std::optional&lt;*&gt;">
<Intrinsic Name="has_value" Expression="_Has_value"/>
<Intrinsic Name="value" Expression="_Value"/>
<DisplayString Condition="!has_value()">nullopt</DisplayString>
<DisplayString Condition="has_value()">{value()}</DisplayString>
<DisplayString Condition="!_Has_value">nullopt</DisplayString>
<DisplayString Condition="_Has_value">{_Value}</DisplayString>
<Expand>
<Item Condition="has_value()" Name="value">value()</Item>
<Item Condition="_Has_value" Name="value">_Value</Item>
</Expand>
</Type>

Expand Down
15 changes: 5 additions & 10 deletions stl/inc/__msvc_all_public_headers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,24 +139,19 @@
#include <vector>

#ifndef _M_CEE_PURE
#include <__msvc_cxx_stdatomic.hpp>
#include <atomic>
#include <barrier>
#include <latch>
#include <semaphore>
#ifndef __clang__ // TRANSITION, GH-2862
#include <stdatomic.h>
#endif // TRANSITION, GH-2862
#include <stop_token>
#endif // _M_CEE_PURE

#ifndef _M_CEE
#include <condition_variable>
#include <execution>
#include <future>
#include <latch>
#include <mutex>
#include <semaphore>
#include <shared_mutex>
#include <stop_token>
#include <thread>
#endif // _M_CEE
#endif // _M_CEE_PURE

// Non-Core C Wrapper Headers
#include <ccomplex>
Expand Down
Loading