Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -616,14 +616,14 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
[enhancement tag]: https://github.com/microsoft/STL/issues?q=is%3Aopen+is%3Aissue+label%3Aenhancement
[gbenchmark]: https://github.com/google/benchmark
[gbenchmark:docs]: https://github.com/google/benchmark/blob/main/docs/user_guide.md
[hub]: https://support.microsoft.com/en-us/help/4021566/windows-10-send-feedback-to-microsoft-with-feedback-hub-app
[hub]: https://support.microsoft.com/help/4021566
[libcxx]: https://libcxx.llvm.org
[lit]: https://llvm.org/docs/CommandGuide/lit.html
[lit result codes]: https://llvm.org/docs/CommandGuide/lit.html#test-status-results
[redistributables]: https://learn.microsoft.com/en-US/cpp/windows/latest-supported-vc-redist
[natvis documentation]: https://learn.microsoft.com/en-us/visualstudio/debugger/create-custom-views-of-native-objects
[ASan]: https://learn.microsoft.com/en-us/cpp/sanitizers/asan
[redistributables]: https://learn.microsoft.com/cpp/windows/latest-supported-vc-redist
[natvis documentation]: https://learn.microsoft.com/visualstudio/debugger/create-custom-views-of-native-objects
[ASan]: https://learn.microsoft.com/cpp/sanitizers/asan
[Import Library]: /docs/import_library.md
[VS 2026 Insiders]: https://visualstudio.microsoft.com/insiders/
[CXXFLAGS]: https://cmake.org/cmake/help/latest/envvar/CXXFLAGS.html
[start-command]: https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/start
[start-command]: https://learn.microsoft.com/windows-server/administration/windows-commands/start
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 @@ -161,7 +161,7 @@ Display-ProgressBar -Status 'Creating virtual network subnet config'
# TRANSITION, 2026-03-31: "After March 31, 2026, new virtual networks will default to using private subnets,
# meaning that an explicit outbound method must be enabled in order to reach public endpoints on the Internet
# and within Microsoft."
# https://learn.microsoft.com/en-us/azure/virtual-network/ip-services/default-outbound-access
# https://learn.microsoft.com/azure/virtual-network/ip-services/default-outbound-access
# We're using `-DefaultOutboundAccess $false` to opt-in early.
$SubnetName = "$ResourceGroupName-Subnet"
$Subnet = New-AzVirtualNetworkSubnetConfig `
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 @@ -45,7 +45,7 @@ $VisualStudioWorkloads = @(
'Microsoft.VisualStudio.Component.Windows11SDK.26100'
)

# https://learn.microsoft.com/en-us/visualstudio/install/visual-studio-on-arm-devices
# https://learn.microsoft.com/visualstudio/install/visual-studio-on-arm-devices
# "There's a single installer for both Visual Studio x64 and Visual Studio Arm64 architectures.
# The Visual Studio Installer detects whether the system architecture is Arm64.
# If it is, the installer downloads and installs the Arm64 version of Visual Studio."
Expand Down Expand Up @@ -176,7 +176,7 @@ Write-Host 'Setting environment variables...'

Write-Host 'Enabling long paths...'

# https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=powershell
# https://learn.microsoft.com/windows/win32/fileio/maximum-file-path-limitation
New-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem' -Name 'LongPathsEnabled' `
-Value 1 -PropertyType DWORD -Force | Out-Null

Expand Down
2 changes: 1 addition & 1 deletion stl/debugger/STL.natvis
Original file line number Diff line number Diff line change
Expand Up @@ -936,7 +936,7 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
* Hard coding _BUF_SIZE for clang-cl compatibility; clang-cl as of 7.0.1 does not emit S_CONSTANT to get _BUF_SIZE
*
* The `na` format specifier means "no address". For more info, see:
* https://learn.microsoft.com/en-us/visualstudio/debugger/format-specifiers-in-cpp?view=vs-2022
* https://learn.microsoft.com/visualstudio/debugger/format-specifiers-in-cpp
-->
<Type Name="std::basic_string&lt;*&gt;">
<Intrinsic Name="size" Expression="_Mypair._Myval2._Mysize" />
Expand Down
2 changes: 1 addition & 1 deletion stl/inc/__msvc_print.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ _NODISCARD _Success_(return == __std_win_error::_Success) __std_win_error
_STD_BEGIN

_NODISCARD consteval bool _Is_ordinary_literal_encoding_utf8() {
// See: https://learn.microsoft.com/en-us/windows/win32/intl/code-page-identifiers
// See: https://learn.microsoft.com/windows/win32/intl/code-page-identifiers
#if defined(_MSVC_EXECUTION_CHARACTER_SET) && _MSVC_EXECUTION_CHARACTER_SET == 65001 // Unicode (UTF-8) == 65001
return true;
#else
Expand Down
2 changes: 1 addition & 1 deletion stl/inc/complex
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#ifdef _M_CEE_PURE
// no intrinsics for /clr:pure
#elif defined(_M_ARM64) || defined(_M_ARM64EC)
// https://learn.microsoft.com/en-us/cpp/build/arm64-windows-abi-conventions?view=msvc-170#base-requirements
// https://learn.microsoft.com/cpp/build/arm64-windows-abi-conventions#base-requirements
// Both floating-point and NEON support are presumed to be present in hardware.
#define _FMP_USING_STD_FMA
#elif defined(_M_IX86) || defined(_M_X64)
Expand Down
2 changes: 1 addition & 1 deletion stl/inc/format
Original file line number Diff line number Diff line change
Expand Up @@ -684,7 +684,7 @@ _NODISCARD constexpr bool _Is_execution_charset_self_synchronizing() {
// We care about this because if a charset is self-synchronizing then we can search through it
// for formatting control characters _without_ generally decoding the format string.
switch (_MSVC_EXECUTION_CHARACTER_SET) {
// See: https://learn.microsoft.com/en-us/windows/win32/intl/code-page-identifiers
// See: https://learn.microsoft.com/windows/win32/intl/code-page-identifiers
case 874: // Thai (Windows)
case 1250: // ANSI Central European; Central European (Windows)
case 1251: // ANSI Cyrillic; Cyrillic (Windows)
Expand Down
2 changes: 1 addition & 1 deletion stl/inc/xutility
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ _STL_DISABLE_CLANG_WARNINGS
#endif // ^^^ vector algorithms supported by default ^^^

// _USE_STD_VECTOR_ALGORITHMS is our documented control macro:
// https://learn.microsoft.com/en-us/cpp/standard-library/vectorized-stl-algorithms?view=msvc-170
// https://learn.microsoft.com/cpp/standard-library/vectorized-stl-algorithms
// In the STL's implementation, we inspect the following detection macros,
// because various algorithms are vectorized for various architectures.

Expand Down
25 changes: 12 additions & 13 deletions stl/src/StlCompareStringA.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,22 @@
// int __cdecl __crtCompareStringA - Get type information about an ANSI string.
//
// Purpose:
// Internal support function. Assumes info in ANSI string format. Tries
// to use NLS API call CompareStringA if available and uses CompareStringW
// if it must. If neither is available it fails and returns 0.
// Internal support function. Assumes info in ANSI string format. Tries
// to use NLS API call CompareStringA if available and uses CompareStringW
// if it must. If neither is available it fails and returns 0.
//
// Entry:
// LPCWSTR LocaleName - locale context for the comparison.
// DWORD dwCmpFlags - see https://aka.ms/stl/comparestringex
// LPCSTR lpStringn - multibyte string to be compared
// int cchCountn - char (byte) count (NOT including null terminator)
// (-1 if null terminated)
// int code_page - for MB/WC conversion. If 0, use __lc_codepage
// LPCWSTR LocaleName - locale context for the comparison.
// DWORD dwCmpFlags - https://learn.microsoft.com/windows/win32/api/stringapiset/nf-stringapiset-comparestringex
// LPCSTR lpStringn - multibyte string to be compared
// int cchCountn - char (byte) count (NOT including null terminator) (-1 if null terminated)
// int code_page - for MB/WC conversion. If 0, use __lc_codepage
//
// Exit:
// Success: 1 - if lpString1 < lpString2
// 2 - if lpString1 == lpString2
// 3 - if lpString1 > lpString2
// Failure: 0
// Success: 1 - if lpString1 < lpString2
// 2 - if lpString1 == lpString2
// 3 - if lpString1 > lpString2
// Failure: 0
extern "C" _CRTIMP2 int __cdecl __crtCompareStringA(_In_z_ LPCWSTR LocaleName, _In_ DWORD dwCmpFlags,
_In_reads_(cchCount1) LPCSTR lpString1, _In_ int cchCount1, _In_reads_(cchCount2) LPCSTR lpString2,
_In_ int cchCount2, _In_ int code_page) noexcept {
Expand Down
5 changes: 2 additions & 3 deletions stl/src/StlCompareStringW.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,9 @@
//
// Entry:
// LPCWSTR LocaleName - locale context for the comparison.
// DWORD dwCmpFlags - see https://aka.ms/stl/comparestringex
// DWORD dwCmpFlags - https://learn.microsoft.com/windows/win32/api/stringapiset/nf-stringapiset-comparestringex
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These two URLs are different from the other two

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, there were two pairs of URLs. I replaced each with what they expand to, then dropped the /en-us component.

// LPCWSTR lpStringn - wide string to be compared
// int cchCountn - wide char (word) count (NOT including null terminator)
// (-1 if null terminated)
// int cchCountn - wide char (word) count (NOT including null terminator) (-1 if null terminated)
//
// Exit:
// Success: 1 - if lpString1 < lpString2
Expand Down
2 changes: 1 addition & 1 deletion stl/src/StlLCMapStringA.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
//
// Entry:
// LPCWSTR LocaleName - locale context for the comparison.
// DWORD dwMapFlags - see https://aka.ms/stl/lcmapstringex
// DWORD dwMapFlags - see https://learn.microsoft.com/windows/win32/api/winnls/nf-winnls-lcmapstringex
// LPCSTR lpSrcStr - pointer to string to be mapped
// int cchSrc - wide char (word) count of input string
// (including null terminator if any)
Expand Down
2 changes: 1 addition & 1 deletion stl/src/StlLCMapStringW.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
//
// Entry:
// LPCWSTR locale_name - locale context for the comparison.
// DWORD map_flags - see https://aka.ms/stl/lcmapstringex
// DWORD map_flags - see https://learn.microsoft.com/windows/win32/api/winnls/nf-winnls-lcmapstringex
// LPCWSTR source - pointer to string to be mapped
// int source_count - wide char (word) count of input string
// (including null terminator if any)
Expand Down
2 changes: 1 addition & 1 deletion stl/src/cthread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ _CRTIMP2_PURE unsigned int __cdecl _Thrd_hardware_concurrency() noexcept { // re
DWORD buffer_size = stack_buffer_size;
_STD unique_ptr<unsigned char[]> new_buffer;

// https://learn.microsoft.com/en-us/windows/win32/api/sysinfoapi/nf-sysinfoapi-getlogicalprocessorinformationex
// https://learn.microsoft.com/windows/win32/api/sysinfoapi/nf-sysinfoapi-getlogicalprocessorinformationex
// The buffer "receives a sequence of variable-sized SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX structures".
for (;;) {
if (GetLogicalProcessorInformationEx(RelationProcessorPackage,
Expand Down
2 changes: 1 addition & 1 deletion stl/src/print.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ extern "C" {
const int _Fd = _fileno(_Stream);

if (_Fd == -2) {
// According to https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/fileno?view=msvc-170 ,
// According to https://learn.microsoft.com/cpp/c-runtime-library/reference/fileno ,
// _fileno() returns -2 if _Stream refers to either stdout or stderr and there is no associated output stream.
// In that case, there is also no associated console HANDLE. (We haven't observed this happening in practice.)
return __std_unicode_console_retrieval_result{._Error = __std_win_error::_Not_supported};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Copyright (c) Microsoft Corporation.
SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-->

<!-- https://learn.microsoft.com/en-us/windows/win32/sbscs/application-manifests#longPathAware -->
<!-- https://learn.microsoft.com/windows/win32/sbscs/application-manifests#longPathAware -->
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
<asmv3:application>
<asmv3:windowsSettings xmlns:ws2="http://schemas.microsoft.com/SMI/2016/WindowsSettings">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ using namespace std;
#pragma comment(lib, "Advapi32") // for RegGetValueW()

bool are_long_paths_enabled() {
// https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=powershell
// https://learn.microsoft.com/en-us/windows/win32/api/winreg/nf-winreg-reggetvaluew
// https://learn.microsoft.com/windows/win32/fileio/maximum-file-path-limitation
// https://learn.microsoft.com/windows/win32/api/winreg/nf-winreg-reggetvaluew
DWORD registry_value = 0;
DWORD buffer_size = sizeof(registry_value);
const LSTATUS status = RegGetValueW(HKEY_LOCAL_MACHINE, LR"(SYSTEM\CurrentControlSet\Control\FileSystem)",
Expand Down
2 changes: 1 addition & 1 deletion tests/std/tests/GH_005780_non_ascii_locales/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ void assert_string_non_ascii(const string& str) {

// GH-5780 <iostream>: Printing with std::cout changes the global locale permanently
void test_gh_5780() {
// https://learn.microsoft.com/en-us/cpp/c-runtime-library/language-strings#supported-language-strings
// https://learn.microsoft.com/cpp/c-runtime-library/language-strings#supported-language-strings
const string locale_name = set_locale("norwegian-bokmal.437");
assert_string_non_ascii(locale_name);

Expand Down
2 changes: 1 addition & 1 deletion tests/std/tests/P0811R3_midpoint_lerp/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ using limits = numeric_limits<Ty>;

#ifdef _M_FP_STRICT
// According to:
// https://learn.microsoft.com/en-us/cpp/build/reference/fp-specify-floating-point-behavior
// https://learn.microsoft.com/cpp/build/reference/fp-specify-floating-point-behavior
// Under the default /fp:precise mode:
// The compiler generates code intended to run in the default floating-point environment and assumes that the
// floating-point environment is not accessed or modified at runtime.
Expand Down
1 change: 0 additions & 1 deletion tests/std/tests/P0896R4_ranges_range_machinery/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2090,7 +2090,6 @@ constexpr bool complicated_algorithm_test() {
}

// Regression test for DevCom-739010 (aka VSO-985597)
// https://developercommunity.visualstudio.com/content/problem/739010/meow.html
// which allows overload resolution to prefer a hidden friend `const T&` overload of `begin`
// for an rvalue `T` over the deleted `begin(T&&)` instantiated from the poison pill.
template <class T>
Expand Down
2 changes: 1 addition & 1 deletion tests/std/tests/P2093R14_formatted_output/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,7 @@ int main(int argc, char* argv[]) {

constexpr BOOL inherit_handles = TRUE;

// https://learn.microsoft.com/en-us/windows/win32/procthread/process-creation-flags
// https://learn.microsoft.com/windows/win32/procthread/process-creation-flags
// "The new process has a new console, instead of inheriting its parent's console (the default)."
constexpr DWORD creation_flags = CREATE_NEW_CONSOLE;

Expand Down
2 changes: 1 addition & 1 deletion tests/std/tests/VSO_0000000_string_view_idl/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ int main(int argc, char* argv[]) {
#endif // _ITERATOR_DEBUG_LEVEL != 0

// basic_string_view::_Copy_s() is a non-Standard extension that's unconditionally checked.
// See: https://learn.microsoft.com/en-us/cpp/standard-library/basic-string-view-class?view=msvc-170#_copy_s
// See: https://learn.microsoft.com/cpp/standard-library/basic-string-view-class#_copy_s
exec.add_death_tests({
test_case_Copy_s,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ int main() {
// See DevCom-274938, where a customer wanted to read a std::atomic from a read-only memory-mapped file.
// This was originally implemented with cmpxchg8b on x86 which raised a write access violation.

// https://learn.microsoft.com/en-us/windows/win32/api/memoryapi/nf-memoryapi-createfilemappingw
// https://learn.microsoft.com/windows/win32/api/memoryapi/nf-memoryapi-createfilemappingw
// "If hFile is INVALID_HANDLE_VALUE, [...] CreateFileMapping creates a file mapping object of a
// specified size that is backed by the system paging file instead of by a file in the file system."
// "The initial contents of the pages in a file mapping object
Expand Down