Skip to content
Merged
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
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ issue. The [bug tag][] and [enhancement tag][] are being populated.

# Goals

We're implementing the latest C++ Working Draft, currently [N4861][], which will eventually become the next C++
We're implementing the latest C++ Working Draft, currently [N4868][], which will eventually become the next C++
International Standard, C++20. The terms Working Draft (WD) and Working Paper (WP) are interchangeable; we often
informally refer to these drafts as "the Standard" while being aware of the difference. (There are other relevant
Standards; for example, supporting `/std:c++14` and `/std:c++17` involves understanding how the C++14 and C++17
Expand Down Expand Up @@ -143,7 +143,7 @@ Just try to follow these rules, so we can spend more time fixing bugs and implem
The STL uses boost-math headers to provide P0226R1 Mathematical Special Functions. We recommend using [vcpkg][] to
acquire this dependency.

1. Install Visual Studio 2019 16.8 Preview 4 or later.
1. Install Visual Studio 2019 16.8 Preview 5 or later.
* 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.17 or later, and [Ninja][] 1.8.2 or later.
Expand All @@ -158,7 +158,7 @@ acquire this dependency.

# How To Build With A Native Tools Command Prompt

1. Install Visual Studio 2019 16.8 Preview 4 or later.
1. Install Visual Studio 2019 16.8 Preview 5 or later.
* 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.17 or later, and [Ninja][] 1.8.2 or later.
Expand Down Expand Up @@ -406,7 +406,7 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
[LWG issues]: https://cplusplus.github.io/LWG/lwg-toc.html
[LWG tag]: https://github.com/microsoft/STL/issues?q=is%3Aopen+is%3Aissue+label%3ALWG
[Microsoft Open Source Code of Conduct]: https://opensource.microsoft.com/codeofconduct/
[N4861]: https://wg21.link/n4861
[N4868]: https://wg21.link/n4868
[NOTICE.txt]: NOTICE.txt
[Ninja]: https://ninja-build.org
[Pipelines]: https://dev.azure.com/vclibs/STL/_build/latest?definitionId=2&branchName=master
Expand Down
2 changes: 1 addition & 1 deletion azure-devops/create-vmss.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ $ErrorActionPreference = 'Stop'

$Location = 'westus2'
$Prefix = 'StlBuild-' + (Get-Date -Format 'yyyy-MM-dd')
$VMSize = 'Standard_D16as_v4'
$VMSize = 'Standard_D32as_v4'
$ProtoVMName = 'PROTOTYPE'
$LiveVMPrefix = 'BUILD'
$WindowsServerSku = '2019-Datacenter'
Expand Down
2 changes: 1 addition & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
variables:
tmpDir: 'D:\Temp'

pool: 'StlBuild-2020-10-13'
pool: 'StlBuild-2020-10-23'

stages:
- stage: Code_Format
Expand Down
35 changes: 13 additions & 22 deletions stl/inc/algorithm
Original file line number Diff line number Diff line change
Expand Up @@ -94,16 +94,11 @@ struct _Optimistic_temporary_buffer { // temporary storage with _alloca-like att

#ifdef __cpp_lib_concepts
namespace ranges {
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunknown-attributes"
#endif // __clang__

// STRUCT TEMPLATE in_fun_result
template <class _In, class _Fun>
struct in_fun_result {
[[no_unique_address]] _In in;
[[no_unique_address]] _Fun fun;
/* [[no_unique_address]] */ _In in;
/* [[no_unique_address]] */ _Fun fun;

template <_Convertible_from<const _In&> _IIn, _Convertible_from<const _Fun&> _FFun>
constexpr operator in_fun_result<_IIn, _FFun>() const& {
Expand All @@ -119,8 +114,8 @@ namespace ranges {
// STRUCT TEMPLATE in_in_result
template <class _In1, class _In2>
struct in_in_result {
[[no_unique_address]] _In1 in1;
[[no_unique_address]] _In2 in2;
/* [[no_unique_address]] */ _In1 in1;
/* [[no_unique_address]] */ _In2 in2;

template <_Convertible_from<const _In1&> _IIn1, _Convertible_from<const _In2&> _IIn2>
constexpr operator in_in_result<_IIn1, _IIn2>() const& {
Expand All @@ -136,9 +131,9 @@ namespace ranges {
// STRUCT TEMPLATE in_in_out_result
template <class _In1, class _In2, class _Out>
struct in_in_out_result {
[[no_unique_address]] _In1 in1;
[[no_unique_address]] _In2 in2;
[[no_unique_address]] _Out out;
/* [[no_unique_address]] */ _In1 in1;
/* [[no_unique_address]] */ _In2 in2;
/* [[no_unique_address]] */ _Out out;

template <_Convertible_from<const _In1&> _IIn1, _Convertible_from<const _In2&> _IIn2,
_Convertible_from<const _Out&> _OOut>
Expand All @@ -155,9 +150,9 @@ namespace ranges {
// STRUCT TEMPLATE in_out_out_result
template <class _In, class _Out1, class _Out2>
struct in_out_out_result {
[[no_unique_address]] _In in;
[[no_unique_address]] _Out1 out1;
[[no_unique_address]] _Out2 out2;
/* [[no_unique_address]] */ _In in;
/* [[no_unique_address]] */ _Out1 out1;
/* [[no_unique_address]] */ _Out2 out2;

template <_Convertible_from<const _In&> _IIn, _Convertible_from<const _Out1&> _OOut1,
_Convertible_from<const _Out2&> _OOut2>
Expand All @@ -174,8 +169,8 @@ namespace ranges {
// STRUCT TEMPLATE min_max_result
template <class _Ty>
struct min_max_result {
[[no_unique_address]] _Ty min;
[[no_unique_address]] _Ty max;
/* [[no_unique_address]] */ _Ty min;
/* [[no_unique_address]] */ _Ty max;

template <_Convertible_from<const _Ty&> _Ty2>
constexpr operator min_max_result<_Ty2>() const& {
Expand All @@ -191,7 +186,7 @@ namespace ranges {
// STRUCT TEMPLATE in_found_result
template <class _In>
struct in_found_result {
[[no_unique_address]] _In in;
/* [[no_unique_address]] */ _In in;
bool found;

template <_Convertible_from<const _In&> _IIn>
Expand Down Expand Up @@ -291,10 +286,6 @@ namespace ranges {
return _RANGES next(_Mid, _Uend(_Range));
}
}

#ifdef __clang__
#pragma clang diagnostic pop
#endif // __clang__
} // namespace ranges
#endif // __cpp_lib_concepts

Expand Down
2 changes: 1 addition & 1 deletion stl/inc/cvt/ebcdic
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ namespace stdext {
0x8e, 0x8f, 0x90, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, //
0x9f, 0xa0, 0xaa, 0xab, 0xac, 0x4a, 0xae, 0xaf, //
0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, //
0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0x6a, 0xbe, 0xbf, // eo
0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0x6a, 0xbe, 0xbf, // e0
0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xda, 0xdb, //
0xdc, 0xdd, 0xde, 0xdf, 0xea, 0xeb, 0xec, 0xed, //
0xee, 0xef, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, //
Expand Down
2 changes: 1 addition & 1 deletion stl/inc/memory_resource
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,7 @@ namespace pmr {
}

protected:
virtual void* do_allocate(const size_t _Bytes, const size_t _Align) override {
virtual void* do_allocate(size_t _Bytes, size_t _Align) override { // TRANSITION, DevCom-1159869
// allocate from the current buffer or a new larger buffer from upstream
if (!_STD align(_Align, _Bytes, _Current_buffer, _Space_available)) {
_Increase_capacity(_Bytes, _Align);
Expand Down
13 changes: 2 additions & 11 deletions stl/inc/xmemory
Original file line number Diff line number Diff line change
Expand Up @@ -1447,16 +1447,11 @@ namespace ranges {
template <class _To, class _From>
concept _Convertible_from = convertible_to<_From, _To>;

#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunknown-attributes"
#endif // __clang__

// STRUCT TEMPLATE in_out_result
template <class _In, class _Out>
struct in_out_result {
[[no_unique_address]] _In in;
[[no_unique_address]] _Out out;
/* [[no_unique_address]] */ _In in;
/* [[no_unique_address]] */ _Out out;

template <_Convertible_from<const _In&> _IIn, _Convertible_from<const _Out&> _OOut>
constexpr operator in_out_result<_IIn, _OOut>() const& {
Expand All @@ -1468,10 +1463,6 @@ namespace ranges {
return {_STD move(in), _STD move(out)};
}
};

#ifdef __clang__
#pragma clang diagnostic pop
#endif // __clang__
} // namespace ranges
#endif // __cpp_lib_concepts

Expand Down
1 change: 1 addition & 0 deletions tests/std/test.lst
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,7 @@ tests\P1135R6_latch
tests\P1135R6_semaphore
tests\P1165R1_consistently_propagating_stateful_allocators
tests\P1423R3_char8_t_remediation
tests\P1502R1_standard_library_header_units
tests\P1614R2_spaceship
tests\P1645R1_constexpr_numeric
tests\VSO_0000000_allocator_propagation
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
126 changes: 126 additions & 0 deletions tests/std/tests/P1502R1_standard_library_header_units/custom_format.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

from pathlib import Path

from stl.test.format import STLTestFormat, TestStep


class CustomTestFormat(STLTestFormat):
def getBuildSteps(self, test, lit_config, shared):
shared.exec_dir = test.getExecDir()
output_base = test.getOutputBaseName()
output_dir = test.getOutputDir()
source_path = Path(test.getSourcePath())

stl_headers = [
'algorithm',
'any',
'array',
'atomic',
'barrier',
'bit',
'bitset',
'charconv',
'chrono',
'codecvt',
'compare',
'complex',
'concepts',
'condition_variable',
'coroutine',
'deque',
'exception',
'execution',
'filesystem',
# 'format',
'forward_list',
'fstream',
'functional',
'future',
'initializer_list',
'iomanip',
'ios',
'iosfwd',
'iostream',
'istream',
'iterator',
'latch',
'limits',
'list',
'locale',
'map',
'memory_resource',
'memory',
'mutex',
'new',
'numbers',
'numeric',
'optional',
'ostream',
'queue',
'random',
'ranges',
'ratio',
'regex',
'scoped_allocator',
'semaphore',
'set',
'shared_mutex',
# 'source_location',
'span',
'sstream',
'stack',
'stdexcept',
'stop_token',
'streambuf',
'string_view',
'string',
'strstream',
# 'syncstream',
'system_error',
'thread',
'tuple',
'type_traits',
'typeindex',
'typeinfo',
'unordered_map',
'unordered_set',
'utility',
'valarray',
'variant',
'vector',
'version',
]

compile_test_cpp_with_edg = test.cxx.flags.count('/BE') == 1

if compile_test_cpp_with_edg:
test.cxx.flags.remove('/BE')

header_unit_options = []

for header in stl_headers:
header_obj_path = output_dir / (header + '.obj')

header_unit_options.append('/headerUnit')
header_unit_options.append('{0}/{1}={1}.ifc'.format(test.config.cxx_headers, header))

if not compile_test_cpp_with_edg:
header_unit_options.append(str(header_obj_path))

cmd, out_files = test.cxx._basicCmd(source_files = [], out = None,
flags = ['/exportHeader', '<{}>'.format(header), '/Fo{}'.format(str(header_obj_path))],
skip_mode_flags = True)
yield TestStep(cmd, shared.exec_dir, [], test.cxx.compile_env)

if compile_test_cpp_with_edg:
test.cxx.flags.append('/BE')

cmd, out_files, shared.exec_file = \
test.cxx.executeBasedOnFlagsCmd([source_path],
output_dir, shared.exec_dir,
output_base, header_unit_options, [], [])

yield TestStep(cmd, shared.exec_dir, [source_path],
test.cxx.compile_env)
Loading