Skip to content

Commit

Permalink
Toolset update: VS 2022 17.3 Preview 3, Clang 14 (#2861)
Browse files Browse the repository at this point in the history
Co-authored-by: Casey Carter <[email protected]>
  • Loading branch information
StephanTLavavej and CaseyCarter authored Jul 14, 2022
1 parent 969b2e2 commit 18451dc
Show file tree
Hide file tree
Showing 165 changed files with 630 additions and 754 deletions.
20 changes: 17 additions & 3 deletions .clang-format
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

# https://releases.llvm.org/13.0.0/tools/clang/docs/ClangFormatStyleOptions.html
# https://releases.llvm.org/14.0.0/tools/clang/docs/ClangFormatStyleOptions.html

---
# Language: Cpp
Expand All @@ -25,7 +25,6 @@ AlignOperands: AlignAfterOperator
# AlignTrailingComments: true
AlignTrailingComments: false
# AllowAllArgumentsOnNextLine: true
# AllowAllConstructorInitializersOnNextLine: true
# AllowAllParametersOfDeclarationOnNextLine: true
# AllowShortEnumsOnASingleLine: true
# AllowShortBlocksOnASingleLine: Never
Expand Down Expand Up @@ -77,8 +76,8 @@ BreakBeforeBinaryOperators: NonAssignment
# ColumnLimit: 80
ColumnLimit: 120
# CommentPragmas: '^ IWYU pragma:'
# QualifierAlignment: Leave
# CompactNamespaces: false
# ConstructorInitializerAllOnOneLineOrOnePerLine: false
# ConstructorInitializerIndentWidth: 4
# ContinuationIndentWidth: 4
# Cpp11BracedListStyle: true
Expand All @@ -89,6 +88,10 @@ DeriveLineEnding: false
# EmptyLineAfterAccessModifier: Never
# EmptyLineBeforeAccessModifier: LogicalBlock
# ExperimentalAutoDetectBinPacking: false
# PackConstructorInitializers: BinPack
# BasedOnStyle: ''
# ConstructorInitializerAllOnOneLineOrOnePerLine: false
# AllowAllConstructorInitializersOnNextLine: true
# FixNamespaceComments: true
# ForEachMacros:
# - foreach
Expand Down Expand Up @@ -162,6 +165,7 @@ NamespaceIndentation: All
# PenaltyBreakBeforeFirstCallParameter: 19
# PenaltyBreakComment: 300
# PenaltyBreakFirstLessLess: 120
# PenaltyBreakOpenParenthesis: 0
# PenaltyBreakString: 1000
# PenaltyBreakTemplateDeclaration: 10
# PenaltyExcessCharacter: 1000000
Expand All @@ -172,6 +176,8 @@ PointerAlignment: Left
# PPIndentWidth: -1
# ReferenceAlignment: Pointer
# ReflowComments: true
# RemoveBracesLLVM: false
# SeparateDefinitionBlocks: Leave
# ShortNamespaceLines: 1
# SortIncludes: CaseSensitive
# SortJavaStaticImport: Before
Expand All @@ -186,6 +192,14 @@ SpaceAfterCStyleCast: true
# SpaceBeforeCtorInitializerColon: true
# SpaceBeforeInheritanceColon: true
# SpaceBeforeParens: ControlStatements
# SpaceBeforeParensOptions:
# AfterControlStatements: true
# AfterForeachMacros: true
# AfterFunctionDefinitionName: false
# AfterFunctionDeclarationName: false
# AfterIfMacros: true
# AfterOverloadedOperator: false
# BeforeNonEmptyParentheses: false
# SpaceAroundPointerQualifiers: Default
# SpaceBeforeRangeBasedForLoopColon: true
# SpaceInEmptyBlock: false
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ 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.3 Preview 2 or later.
1. Install Visual Studio 2022 17.3 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.
Expand All @@ -157,7 +157,7 @@ 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.3 Preview 2 or later.
1. Install Visual Studio 2022 17.3 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.
Expand Down
2 changes: 1 addition & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ variables:
tmpDir: 'D:\Temp'
buildOutputLocation: 'D:\build'

pool: 'StlBuild-2022-06-28-T1518'
pool: 'StlBuild-2022-07-12-T1418'

stages:
- stage: Code_Format
Expand Down
2 changes: 2 additions & 0 deletions stl/inc/__msvc_all_public_headers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,9 @@
#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

Expand Down
2 changes: 1 addition & 1 deletion stl/inc/algorithm
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ struct _Optimistic_temporary_buffer { // temporary storage with _alloca-like att
_Capacity = _Optimistic_count;
}

_Optimistic_temporary_buffer(const _Optimistic_temporary_buffer&) = delete;
_Optimistic_temporary_buffer(const _Optimistic_temporary_buffer&) = delete;
_Optimistic_temporary_buffer& operator=(const _Optimistic_temporary_buffer&) = delete;

~_Optimistic_temporary_buffer() noexcept {
Expand Down
4 changes: 2 additions & 2 deletions stl/inc/array
Original file line number Diff line number Diff line change
Expand Up @@ -831,7 +831,7 @@ _NODISCARD constexpr array<remove_cv_t<_Ty>, _Size> _To_array_lvalue_impl(

template <class _Ty, size_t _Size, size_t... _Idx>
_NODISCARD constexpr array<remove_cv_t<_Ty>, _Size> _To_array_rvalue_impl(
_Ty(&&_Array)[_Size], index_sequence<_Idx...>) {
_Ty (&&_Array)[_Size], index_sequence<_Idx...>) {
return {{_STD move(_Array[_Idx])...}};
}

Expand All @@ -845,7 +845,7 @@ _NODISCARD constexpr array<remove_cv_t<_Ty>, _Size> to_array(_Ty (&_Array)[_Size
}

template <class _Ty, size_t _Size>
_NODISCARD constexpr array<remove_cv_t<_Ty>, _Size> to_array(_Ty(&&_Array)[_Size]) {
_NODISCARD constexpr array<remove_cv_t<_Ty>, _Size> to_array(_Ty (&&_Array)[_Size]) {
static_assert(!is_array_v<_Ty>, "N4830 [array.creation]/4: "
"to_array does not accept multidimensional arrays.");
static_assert(is_move_constructible_v<_Ty>, "N4830 [array.creation]/4: "
Expand Down
10 changes: 5 additions & 5 deletions stl/inc/atomic
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ struct _Storage_for {
// uninitialized space to store a _Ty
alignas(_Ty) unsigned char _Storage[sizeof(_Ty)];

_Storage_for() = default;
_Storage_for(const _Storage_for&) = delete;
_Storage_for() = default;
_Storage_for(const _Storage_for&) = delete;
_Storage_for& operator=(const _Storage_for&) = delete;

#if _CMPXCHG_MASK_OUT_PADDING_BITS
Expand Down Expand Up @@ -445,7 +445,7 @@ public:
_Atomic_lock_release(_Spinlock);
}

_Atomic_lock_guard(const _Atomic_lock_guard&) = delete;
_Atomic_lock_guard(const _Atomic_lock_guard&) = delete;
_Atomic_lock_guard& operator=(const _Atomic_lock_guard&) = delete;

private:
Expand Down Expand Up @@ -2102,7 +2102,7 @@ public:

constexpr atomic() noexcept(is_nothrow_default_constructible_v<_Ty>) : _Base() {}

atomic(const atomic&) = delete;
atomic(const atomic&) = delete;
atomic& operator=(const atomic&) = delete;

#if _HAS_CXX17
Expand Down Expand Up @@ -2910,7 +2910,7 @@ public:
constexpr _Locked_pointer() noexcept : _Storage{} {}
explicit _Locked_pointer(_Ty* const _Ptr) noexcept : _Storage{reinterpret_cast<uintptr_t>(_Ptr)} {}

_Locked_pointer(const _Locked_pointer&) = delete;
_Locked_pointer(const _Locked_pointer&) = delete;
_Locked_pointer& operator=(const _Locked_pointer&) = delete;

_NODISCARD _Ty* _Lock_and_load() noexcept {
Expand Down
2 changes: 1 addition & 1 deletion stl/inc/barrier
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public:
"Precondition: expected >= 0 and expected <= max() (N4861 [thread.barrier.class]/9)");
}

barrier(const barrier&) = delete;
barrier(const barrier&) = delete;
barrier& operator=(const barrier&) = delete;

_NODISCARD static constexpr ptrdiff_t(max)() noexcept {
Expand Down
14 changes: 7 additions & 7 deletions stl/inc/chrono
Original file line number Diff line number Diff line change
Expand Up @@ -1675,7 +1675,7 @@ namespace chrono {
public:
explicit time_zone(string_view _Name_) : _Name(_Name_) {}

time_zone(time_zone&&) = default;
time_zone(time_zone&&) = default;
time_zone& operator=(time_zone&&) = default;

_NODISCARD string_view name() const noexcept {
Expand Down Expand Up @@ -1836,7 +1836,7 @@ namespace chrono {

class leap_second {
public:
leap_second(const leap_second&) = default;
leap_second(const leap_second&) = default;
leap_second& operator=(const leap_second&) = default;

constexpr leap_second(
Expand Down Expand Up @@ -1931,7 +1931,7 @@ namespace chrono {
public:
explicit time_zone_link(string_view _Name_, string_view _Target_) : _Name(_Name_), _Target(_Target_) {}

time_zone_link(time_zone_link&&) = default;
time_zone_link(time_zone_link&&) = default;
time_zone_link& operator=(time_zone_link&&) = default;

_NODISCARD string_view name() const noexcept {
Expand Down Expand Up @@ -2119,7 +2119,7 @@ namespace chrono {
public:
using const_iterator = _ListType::const_iterator;

tzdb_list(const tzdb_list&) = delete;
tzdb_list(const tzdb_list&) = delete;
tzdb_list& operator=(const tzdb_list&) = delete;

tzdb_list() {
Expand Down Expand Up @@ -2193,7 +2193,7 @@ namespace chrono {
_Smtx_lock_shared(_Mtx);
}

_Shared_lock(const _Shared_lock&) = delete;
_Shared_lock(const _Shared_lock&) = delete;
_Shared_lock& operator=(const _Shared_lock&) = delete;

~_Shared_lock() {
Expand All @@ -2208,7 +2208,7 @@ namespace chrono {
_Smtx_lock_exclusive(_Mtx);
}

_Unique_lock(const _Unique_lock&) = delete;
_Unique_lock(const _Unique_lock&) = delete;
_Unique_lock& operator=(const _Unique_lock&) = delete;

~_Unique_lock() {
Expand Down Expand Up @@ -2316,7 +2316,7 @@ namespace chrono {

template <class _Traits2 = _Traits, class = void_t<decltype(_Traits2::default_zone())>>
zoned_time() : _Zone{_Traits::default_zone()} {}
zoned_time(const zoned_time&) = default;
zoned_time(const zoned_time&) = default;
zoned_time& operator=(const zoned_time&) = default;

template <class _Traits2 = _Traits, class = void_t<decltype(_Traits2::default_zone())>>
Expand Down
2 changes: 1 addition & 1 deletion stl/inc/compare
Original file line number Diff line number Diff line change
Expand Up @@ -774,7 +774,7 @@ concept _Can_partial_order = requires(_Ty1& _Left, _Ty2& _Right) {

namespace _Compare_partial_order_fallback {
template <class _Ty1, class _Ty2>
concept _Can_fallback_eq_lt_twice = requires(_Ty1 & _Left, _Ty2 & _Right) {
concept _Can_fallback_eq_lt_twice = requires(_Ty1& _Left, _Ty2& _Right) {
{ _Left == _Right } -> _Implicitly_convertible_to<bool>;
{ _Left < _Right } -> _Implicitly_convertible_to<bool>;
{ _Right < _Left } -> _Implicitly_convertible_to<bool>;
Expand Down
6 changes: 3 additions & 3 deletions stl/inc/condition_variable
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ struct _NODISCARD _Unlock_guard {
_Mtx.lock();
}

_Unlock_guard(const _Unlock_guard&) = delete;
_Unlock_guard(const _Unlock_guard&) = delete;
_Unlock_guard& operator=(const _Unlock_guard&) = delete;

private:
Expand All @@ -59,7 +59,7 @@ public:
_Cnd_destroy_in_situ(_Mycnd());
}

condition_variable_any(const condition_variable_any&) = delete;
condition_variable_any(const condition_variable_any&) = delete;
condition_variable_any& operator=(const condition_variable_any&) = delete;

void notify_one() noexcept { // wake up one waiter
Expand Down Expand Up @@ -162,7 +162,7 @@ private:

explicit _Cv_any_notify_all(condition_variable_any* _This_) : _This{_This_} {}

_Cv_any_notify_all(const _Cv_any_notify_all&) = delete;
_Cv_any_notify_all(const _Cv_any_notify_all&) = delete;
_Cv_any_notify_all& operator=(const _Cv_any_notify_all&) = delete;

void operator()() const noexcept {
Expand Down
2 changes: 1 addition & 1 deletion stl/inc/cvt/wbuffer
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ namespace stdext {
return _State;
}

wbuffer_convert(const wbuffer_convert&) = delete;
wbuffer_convert(const wbuffer_convert&) = delete;
wbuffer_convert& operator=(const wbuffer_convert&) = delete;

protected:
Expand Down
2 changes: 1 addition & 1 deletion stl/inc/cvt/wstring
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ namespace stdext {

virtual ~wstring_convert() noexcept {}

wstring_convert(const wstring_convert&) = delete;
wstring_convert(const wstring_convert&) = delete;
wstring_convert& operator=(const wstring_convert&) = delete;

_NODISCARD size_t converted() const noexcept { // get conversion count
Expand Down
2 changes: 1 addition & 1 deletion stl/inc/exception
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ class nested_exception { // wrap an exception_ptr
public:
nested_exception() noexcept : _Exc(_STD current_exception()) {}

nested_exception(const nested_exception&) noexcept = default;
nested_exception(const nested_exception&) noexcept = default;
nested_exception& operator=(const nested_exception&) noexcept = default;
virtual ~nested_exception() noexcept {}

Expand Down
6 changes: 3 additions & 3 deletions stl/inc/execution
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ public:
}
}

_Work_ptr(const _Work_ptr&) = delete;
_Work_ptr(const _Work_ptr&) = delete;
_Work_ptr& operator=(const _Work_ptr&) = delete;

~_Work_ptr() noexcept {
Expand Down Expand Up @@ -548,8 +548,8 @@ class alignas(hardware_destructive_interference_size) _Work_stealing_deque {
// of the queue, and any thread access to the "top" of the queue. Originally described in the paper
// "Dynamic Circular Work-Stealing Deque" by David Chase and Yossi Lev
public:
_Work_stealing_deque() = default;
_Work_stealing_deque(const _Work_stealing_deque&) = delete;
_Work_stealing_deque() = default;
_Work_stealing_deque(const _Work_stealing_deque&) = delete;
_Work_stealing_deque& operator=(const _Work_stealing_deque&) = delete;

~_Work_stealing_deque() noexcept {
Expand Down
8 changes: 4 additions & 4 deletions stl/inc/expected
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,11 @@ public:
}

protected:
bad_expected_access() = default;
bad_expected_access(const bad_expected_access&) = default;
bad_expected_access(bad_expected_access&&) = default;
bad_expected_access() = default;
bad_expected_access(const bad_expected_access&) = default;
bad_expected_access(bad_expected_access&&) = default;
bad_expected_access& operator=(const bad_expected_access&) = default;
bad_expected_access& operator=(bad_expected_access&&) = default;
bad_expected_access& operator=(bad_expected_access&&) = default;

#if !_HAS_EXCEPTIONS
void _Doraise() const override { // perform class-specific exception handling
Expand Down
Loading

0 comments on commit 18451dc

Please sign in to comment.