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
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.15)
cmake_minimum_required(VERSION 3.16)
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
project(msvc_standard_libraries LANGUAGES CXX)

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,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.6 Preview 1 or later.
1. Install Visual Studio 2019 16.6 Preview 2 or later.
2. Invoke `git clone https://github.com/microsoft/vcpkg`
3. Invoke `cd vcpkg`
4. Invoke `.\bootstrap-vcpkg.bat`
Expand All @@ -159,7 +159,7 @@ acquire this dependency.
These instructions assume you're targeting `x64-windows`; you can change this constant below to target other
architectures.

1. Install [CMake][] 3.16.5 or later, [Ninja][] 1.10.0 or later, and Visual Studio 2019 16.6 Preview 1 or later.
1. Install [CMake][] 3.16.5 or later, [Ninja][] 1.10.0 or later, and Visual Studio 2019 16.6 Preview 2 or later.
2. Invoke `git clone https://github.com/microsoft/vcpkg`
3. Invoke `cd vcpkg`
4. Invoke `.\bootstrap-vcpkg.bat`
Expand Down
4 changes: 2 additions & 2 deletions azure-devops/create-new-agent-image.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

$Location = 'westus2'
$Prefix = 'StlBuild-' + (Get-Date -Format 'yyyy-MM-dd')
$VMSize = 'Standard_D16s_v3'
$VMSize = 'Standard_F16s_v2'
$ProtoVMName = 'PROTOTYPE'
$LiveVMPrefix = 'BUILD'
$WindowsServerSku = '2019-Datacenter'
Expand Down Expand Up @@ -249,7 +249,7 @@ $VmssIpConfig = New-AzVmssIpConfig -SubnetId $Nic.IpConfigurations[0].Subnet.Id
$VmssName = $ResourceGroupName + 'Vmss'
$Vmss = New-AzVmssConfig `
-Location $Location `
-SkuCapacity 2 `
-SkuCapacity 0 `
-SkuName $VMSize `
-SkuTier 'Standard' `
-Overprovision $false `
Expand Down
11 changes: 10 additions & 1 deletion azure-devops/provision-image.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ $ReleaseInPath = 'Preview'
$Sku = 'Enterprise'
$VisualStudioBootstrapperUrl = 'https://aka.ms/vs/16/pre/vs_buildtools.exe'
$CMakeUrl = 'https://github.com/Kitware/CMake/releases/download/v3.16.5/cmake-3.16.5-win64-x64.msi'
$LlvmUrl = 'https://releases.llvm.org/9.0.0/LLVM-9.0.0-win64.exe'
$LlvmUrl = 'https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.0/LLVM-10.0.0-win64.exe'
$NinjaUrl = 'https://github.com/ninja-build/ninja/releases/download/v1.10.0/ninja-win.zip'
$PythonUrl = 'https://www.python.org/ftp/python/3.8.2/python-3.8.2-amd64.exe'

Expand Down Expand Up @@ -190,4 +190,13 @@ $environmentKey = Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control
Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment' `
-Name Path `
-Value "$($environmentKey.Path);C:\Program Files\CMake\bin;C:\Program Files\LLVM\bin"

Add-MPPreference -ExclusionPath C:\agent
Add-MPPreference -ExclusionPath D:\
Add-MPPreference -ExclusionProcess ninja.exe
Add-MPPreference -ExclusionProcess clang-cl.exe
Add-MPPreference -ExclusionProcess cl.exe
Add-MPPreference -ExclusionProcess link.exe
Add-MPPreference -ExclusionProcess python.exe

C:\Windows\system32\sysprep\sysprep.exe /oobe /generalize /shutdown
2 changes: 1 addition & 1 deletion azure-devops/run-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jobs:
- job: ${{ parameters.targetPlatform }}
timeoutInMinutes: 360
pool:
name: StlBuild-2020-03-24
name: StlBuild-2020-03-28

variables:
vcpkgLocation: '$(Build.SourcesDirectory)/vcpkg'
Expand Down
60 changes: 30 additions & 30 deletions stl/inc/algorithm
Original file line number Diff line number Diff line change
Expand Up @@ -1249,8 +1249,8 @@ _FwdIt2 copy_if(_ExPo&&, _FwdIt1 _First, _FwdIt1 _Last, _FwdIt2 _Dest, _Pr _Pred
#if _ITERATOR_DEBUG_ARRAY_OVERLOADS
template <class _ExPo, class _FwdIt1, class _DestTy, size_t _DestSize, class _Pr,
_Enable_if_execution_policy_t<_ExPo> = 0>
_DestTy* copy_if(
_ExPo&&, _FwdIt1 _First, _FwdIt1 _Last, _DestTy (&_Dest)[_DestSize], _Pr _Pred) noexcept /* terminates */ {
_DestTy* copy_if(_ExPo&&, _FwdIt1 _First, _FwdIt1 _Last, _DestTy (&_Dest)[_DestSize], _Pr _Pred) noexcept
/* terminates */ {
// copy each satisfying _Pred, array dest
// not parallelized at present, parallelism expected to be feasible in a future release
_REQUIRE_PARALLEL_ITERATOR(_FwdIt1);
Expand Down Expand Up @@ -1397,8 +1397,8 @@ pair<_FwdIt2, _DestFalseTy*> partition_copy(_ExPo&&, _FwdIt1 _First, _FwdIt1 _La
template <class _ExPo, class _FwdIt1, class _DestTrueTy, size_t _DestTrueSize, class _DestFalseTy,
size_t _DestFalseSize, class _Pr, _Enable_if_execution_policy_t<_ExPo> = 0>
pair<_DestTrueTy*, _DestFalseTy*> partition_copy(_ExPo&&, _FwdIt1 _First, _FwdIt1 _Last,
_DestTrueTy (&_Dest_true)[_DestTrueSize], _DestFalseTy (&_Dest_false)[_DestFalseSize],
_Pr _Pred) noexcept /* terminates */ {
_DestTrueTy (&_Dest_true)[_DestTrueSize], _DestFalseTy (&_Dest_false)[_DestFalseSize], _Pr _Pred) noexcept
/* terminates */ {
// copy true partition to _Dest_true, false to _Dest_false, array dest
// not parallelized at present, parallelism expected to be feasible in a future release
_REQUIRE_PARALLEL_ITERATOR(_FwdIt1);
Expand Down Expand Up @@ -2005,8 +2005,8 @@ _NODISCARD _FwdIt1 find_end(
_ExPo&& _Exec, _FwdIt1 _First1, _FwdIt1 _Last1, _FwdIt2 _First2, _FwdIt2 _Last2, _Pr _Pred) noexcept; // terminates

template <class _ExPo, class _FwdIt1, class _FwdIt2, _Enable_if_execution_policy_t<_ExPo> = 0>
_NODISCARD _FwdIt1 find_end(_ExPo&& _Exec, _FwdIt1 _First1, _FwdIt1 _Last1, _FwdIt2 _First2,
_FwdIt2 _Last2) noexcept /* terminates */ { // find last [_First2, _Last2) match
_NODISCARD _FwdIt1 find_end(_ExPo&& _Exec, _FwdIt1 _First1, _FwdIt1 _Last1, _FwdIt2 _First2, _FwdIt2 _Last2) noexcept
/* terminates */ { // find last [_First2, _Last2) match
return _STD find_end(_STD forward<_ExPo>(_Exec), _First1, _Last1, _First2, _Last2, equal_to<>());
}
#endif // _HAS_CXX17
Expand Down Expand Up @@ -2123,8 +2123,8 @@ _FwdIt2 transform(
#if _ITERATOR_DEBUG_ARRAY_OVERLOADS
template <class _ExPo, class _FwdIt1, class _DestTy, size_t _DestSize, class _Fn,
_Enable_if_execution_policy_t<_ExPo> = 0>
_DestTy* transform(
_ExPo&& _Exec, _FwdIt1 _First, _FwdIt1 _Last, _DestTy (&_Dest)[_DestSize], _Fn _Func) noexcept /* terminates */ {
_DestTy* transform(_ExPo&& _Exec, _FwdIt1 _First, _FwdIt1 _Last, _DestTy (&_Dest)[_DestSize], _Fn _Func) noexcept
/* terminates */ {
// transform [_First, _Last) with _Func, array dest
return _STD transform(
_STD forward<_ExPo>(_Exec), _First, _Last, _Array_iterator<_DestTy, _DestSize>(_Dest), _Pass_fn(_Func))
Expand Down Expand Up @@ -2338,8 +2338,8 @@ _CONSTEXPR20 _DestTy* replace_copy_if(

#if _HAS_CXX17
template <class _ExPo, class _FwdIt1, class _FwdIt2, class _Pr, class _Ty, _Enable_if_execution_policy_t<_ExPo> = 0>
_FwdIt2 replace_copy_if(
_ExPo&&, _FwdIt1 _First, _FwdIt1 _Last, _FwdIt2 _Dest, _Pr _Pred, const _Ty& _Val) noexcept /* terminates */ {
_FwdIt2 replace_copy_if(_ExPo&&, _FwdIt1 _First, _FwdIt1 _Last, _FwdIt2 _Dest, _Pr _Pred, const _Ty& _Val) noexcept
/* terminates */ {
// copy replacing each satisfying _Pred with _Val
// not parallelized at present, parallelism expected to be feasible in a future release
_REQUIRE_PARALLEL_ITERATOR(_FwdIt1);
Expand Down Expand Up @@ -2474,8 +2474,8 @@ _FwdIt2 remove_copy(_ExPo&&, _FwdIt1 _First, _FwdIt1 _Last, _FwdIt2 _Dest, const
#if _ITERATOR_DEBUG_ARRAY_OVERLOADS
template <class _ExPo, class _FwdIt1, class _DestTy, size_t _DestSize, class _Ty,
_Enable_if_execution_policy_t<_ExPo> = 0>
_DestTy* remove_copy(
_ExPo&&, _FwdIt1 _First, _FwdIt1 _Last, _DestTy (&_Dest)[_DestSize], const _Ty& _Val) noexcept /* terminates */ {
_DestTy* remove_copy(_ExPo&&, _FwdIt1 _First, _FwdIt1 _Last, _DestTy (&_Dest)[_DestSize], const _Ty& _Val) noexcept
/* terminates */ {
// copy omitting each matching _Val, array dest
// not parallelized at present, parallelism expected to be feasible in a future release
_REQUIRE_PARALLEL_ITERATOR(_FwdIt1);
Expand Down Expand Up @@ -2524,8 +2524,8 @@ _FwdIt2 remove_copy_if(_ExPo&&, _FwdIt1 _First, _FwdIt1 _Last, _FwdIt2 _Dest, _P
#if _ITERATOR_DEBUG_ARRAY_OVERLOADS
template <class _ExPo, class _FwdIt1, class _DestTy, size_t _DestSize, class _Pr,
_Enable_if_execution_policy_t<_ExPo> = 0>
_DestTy* remove_copy_if(
_ExPo&&, _FwdIt1 _First, _FwdIt1 _Last, _DestTy (&_Dest)[_DestSize], _Pr _Pred) noexcept /* terminates */ {
_DestTy* remove_copy_if(_ExPo&&, _FwdIt1 _First, _FwdIt1 _Last, _DestTy (&_Dest)[_DestSize], _Pr _Pred) noexcept
/* terminates */ {
// copy omitting each element satisfying _Pred, array dest
// not parallelized at present, parallelism expected to be feasible in a future release
_REQUIRE_PARALLEL_ITERATOR(_FwdIt1);
Expand Down Expand Up @@ -2772,8 +2772,8 @@ _FwdIt2 unique_copy(_ExPo&&, _FwdIt1 _First, _FwdIt1 _Last, _FwdIt2 _Dest, _Pr _
#if _ITERATOR_DEBUG_ARRAY_OVERLOADS
template <class _ExPo, class _FwdIt1, class _DestTy, size_t _DestSize, class _Pr,
_Enable_if_execution_policy_t<_ExPo> = 0>
_DestTy* unique_copy(
_ExPo&&, _FwdIt1 _First, _FwdIt1 _Last, _DestTy (&_Dest)[_DestSize], _Pr _Pred) noexcept /* terminates */ {
_DestTy* unique_copy(_ExPo&&, _FwdIt1 _First, _FwdIt1 _Last, _DestTy (&_Dest)[_DestSize], _Pr _Pred) noexcept
/* terminates */ {
// copy compressing pairs that match, array dest
// not parallelized at present, parallelism expected to be feasible in a future release
_REQUIRE_PARALLEL_ITERATOR(_FwdIt1);
Expand Down Expand Up @@ -3866,8 +3866,8 @@ _DestTy* merge(_ExPo&&, _FwdIt1 _First1, _FwdIt1 _Last1, _FwdIt2 _First2, _FwdIt
#endif // _ITERATOR_DEBUG_ARRAY_OVERLOADS

template <class _ExPo, class _FwdIt1, class _FwdIt2, class _FwdIt3, _Enable_if_execution_policy_t<_ExPo> = 0>
_FwdIt3 merge(_ExPo&&, _FwdIt1 _First1, _FwdIt1 _Last1, _FwdIt2 _First2, _FwdIt2 _Last2,
_FwdIt3 _Dest) noexcept /* terminates */ {
_FwdIt3 merge(_ExPo&&, _FwdIt1 _First1, _FwdIt1 _Last1, _FwdIt2 _First2, _FwdIt2 _Last2, _FwdIt3 _Dest) noexcept
/* terminates */ {
// copy merging ranges, both using operator<
// not parallelized at present, parallelism expected to be feasible in a future release
_REQUIRE_PARALLEL_ITERATOR(_FwdIt1);
Expand Down Expand Up @@ -4614,17 +4614,17 @@ _CONSTEXPR20 _RanIt partial_sort_copy(_InIt _First1, _InIt _Last1, _RanIt _First

#if _HAS_CXX17
template <class _ExPo, class _FwdIt, class _RanIt, class _Pr, _Enable_if_execution_policy_t<_ExPo> = 0>
_RanIt partial_sort_copy(
_ExPo&&, _FwdIt _First1, _FwdIt _Last1, _RanIt _First2, _RanIt _Last2, _Pr _Pred) noexcept /* terminates */ {
_RanIt partial_sort_copy(_ExPo&&, _FwdIt _First1, _FwdIt _Last1, _RanIt _First2, _RanIt _Last2, _Pr _Pred) noexcept
/* terminates */ {
// copy [_First1, _Last1) into [_First2, _Last2) using _Pred
// parallelism suspected to be infeasible
_REQUIRE_PARALLEL_ITERATOR(_FwdIt);
return _STD partial_sort_copy(_First1, _Last1, _First2, _Last2, _Pass_fn(_Pred));
}

template <class _ExPo, class _FwdIt, class _RanIt, _Enable_if_execution_policy_t<_ExPo> = 0>
_RanIt partial_sort_copy(
_ExPo&&, _FwdIt _First1, _FwdIt _Last1, _RanIt _First2, _RanIt _Last2) noexcept /* terminates */ {
_RanIt partial_sort_copy(_ExPo&&, _FwdIt _First1, _FwdIt _Last1, _RanIt _First2, _RanIt _Last2) noexcept
/* terminates */ {
// copy [_First1, _Last1) into [_First2, _Last2), using operator<
// parallelism suspected to be infeasible
_REQUIRE_PARALLEL_ITERATOR(_FwdIt);
Expand Down Expand Up @@ -4715,8 +4715,8 @@ _NODISCARD _CONSTEXPR20 bool includes(_InIt1 _First1, _InIt1 _Last1, _InIt2 _Fir
#if _HAS_CXX17
// FUNCTION TEMPLATE includes
template <class _ExPo, class _FwdIt1, class _FwdIt2, class _Pr, _Enable_if_execution_policy_t<_ExPo> = 0>
_NODISCARD bool includes(
_ExPo&&, _FwdIt1 _First1, _FwdIt1 _Last1, _FwdIt2 _First2, _FwdIt2 _Last2, _Pr _Pred) noexcept /* terminates */ {
_NODISCARD bool includes(_ExPo&&, _FwdIt1 _First1, _FwdIt1 _Last1, _FwdIt2 _First2, _FwdIt2 _Last2, _Pr _Pred) noexcept
/* terminates */ {
// test if every element in sorted [_First2, _Last2) is in sorted [_First1, _Last1), using _Pred
// not parallelized at present, parallelism expected to be feasible in a future release
_REQUIRE_PARALLEL_ITERATOR(_FwdIt1);
Expand All @@ -4725,8 +4725,8 @@ _NODISCARD bool includes(
}

template <class _ExPo, class _FwdIt1, class _FwdIt2, _Enable_if_execution_policy_t<_ExPo> = 0>
_NODISCARD bool includes(
_ExPo&&, _FwdIt1 _First1, _FwdIt1 _Last1, _FwdIt2 _First2, _FwdIt2 _Last2) noexcept /* terminates */ {
_NODISCARD bool includes(_ExPo&&, _FwdIt1 _First1, _FwdIt1 _Last1, _FwdIt2 _First2, _FwdIt2 _Last2) noexcept
/* terminates */ {
// test if every element in sorted [_First2, _Last2) is in sorted [_First1, _Last1), using operator<
// not parallelized at present, parallelism expected to be feasible in a future release
_REQUIRE_PARALLEL_ITERATOR(_FwdIt1);
Expand Down Expand Up @@ -4818,8 +4818,8 @@ _DestTy* set_union(_ExPo&&, _FwdIt1 _First1, _FwdIt1 _Last1, _FwdIt2 _First2, _F
#endif // _ITERATOR_DEBUG_ARRAY_OVERLOADS

template <class _ExPo, class _FwdIt1, class _FwdIt2, class _FwdIt3, _Enable_if_execution_policy_t<_ExPo> = 0>
_FwdIt3 set_union(_ExPo&&, _FwdIt1 _First1, _FwdIt1 _Last1, _FwdIt2 _First2, _FwdIt2 _Last2,
_FwdIt3 _Dest) noexcept /* terminates */ {
_FwdIt3 set_union(_ExPo&&, _FwdIt1 _First1, _FwdIt1 _Last1, _FwdIt2 _First2, _FwdIt2 _Last2, _FwdIt3 _Dest) noexcept
/* terminates */ {
// OR sets [_First1, _Last1) and [_First2, _Last2), using operator<
// not parallelized at present, parallelism expected to be feasible in a future release
_REQUIRE_PARALLEL_ITERATOR(_FwdIt1);
Expand Down Expand Up @@ -5281,8 +5281,8 @@ _NODISCARD constexpr pair<_FwdIt, _FwdIt> minmax_element(_FwdIt _First, _FwdIt _

#if _HAS_CXX17
template <class _ExPo, class _FwdIt, class _Pr, _Enable_if_execution_policy_t<_ExPo> = 0>
_NODISCARD pair<_FwdIt, _FwdIt> minmax_element(
_ExPo&&, _FwdIt _First, _FwdIt _Last, _Pr _Pred) noexcept /* terminates */ {
_NODISCARD pair<_FwdIt, _FwdIt> minmax_element(_ExPo&&, _FwdIt _First, _FwdIt _Last, _Pr _Pred) noexcept
/* terminates */ {
// find smallest and largest elements, using _Pred
// not parallelized at present, parallelism expected to be feasible in a future release
return _STD minmax_element(_First, _Last, _Pass_fn(_Pred));
Expand Down
6 changes: 3 additions & 3 deletions stl/inc/array
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@ public:
return _Elems[_Pos];
}

_NODISCARD constexpr const_reference operator[](_In_range_(0, _Size - 1) size_type _Pos) const
noexcept /* strengthened */ {
_NODISCARD constexpr const_reference operator[](_In_range_(0, _Size - 1) size_type _Pos) const noexcept
/* strengthened */ {
#if _CONTAINER_DEBUG_LEVEL > 0
_STL_VERIFY(_Pos < _Size, "array subscript out of range");
#endif // _CONTAINER_DEBUG_LEVEL > 0
Expand Down Expand Up @@ -200,7 +200,7 @@ struct _Enforce_same {
};

template <class _First, class... _Rest>
array(_First, _Rest...)->array<typename _Enforce_same<_First, _Rest...>::type, 1 + sizeof...(_Rest)>;
array(_First, _Rest...) -> array<typename _Enforce_same<_First, _Rest...>::type, 1 + sizeof...(_Rest)>;
#endif // _HAS_CXX17

template <class _Ty>
Expand Down
2 changes: 1 addition & 1 deletion stl/inc/atomic
Original file line number Diff line number Diff line change
Expand Up @@ -1637,7 +1637,7 @@ public:

#if _HAS_CXX17
template <class _Ty>
atomic(_Ty)->atomic<_Ty>;
atomic(_Ty) -> atomic<_Ty>;
#endif // _HAS_CXX17

// NONMEMBER OPERATIONS ON ATOMIC TYPES
Expand Down
60 changes: 25 additions & 35 deletions stl/inc/bitset
Original file line number Diff line number Diff line change
Expand Up @@ -286,23 +286,18 @@ public:
constexpr bool _Bits_zero = _Bits == 0;
constexpr bool _Bits_small = _Bits <= 32;
constexpr bool _Bits_large = _Bits > 64;
if
_CONSTEXPR_IF(_Bits_zero) {
return 0;
}
else if
_CONSTEXPR_IF(_Bits_small) {
return static_cast<unsigned long>(_Array[0]);
}
else {
if
_CONSTEXPR_IF(_Bits_large) {
for (size_t _Idx = 1; _Idx <= _Words; ++_Idx) {
if (_Array[_Idx] != 0) {
_Xoflo(); // fail if any high-order words are nonzero
}
if _CONSTEXPR_IF (_Bits_zero) {
return 0;
} else if _CONSTEXPR_IF (_Bits_small) {
return static_cast<unsigned long>(_Array[0]);
} else {
if _CONSTEXPR_IF (_Bits_large) {
for (size_t _Idx = 1; _Idx <= _Words; ++_Idx) {
if (_Array[_Idx] != 0) {
_Xoflo(); // fail if any high-order words are nonzero
}
}
}

if (_Array[0] > ULONG_MAX) {
_Xoflo();
Expand All @@ -315,19 +310,16 @@ public:
_NODISCARD unsigned long long to_ullong() const {
constexpr bool _Bits_zero = _Bits == 0;
constexpr bool _Bits_large = _Bits > 64;
if
_CONSTEXPR_IF(_Bits_zero) {
return 0;
}
else {
if
_CONSTEXPR_IF(_Bits_large) {
for (size_t _Idx = 1; _Idx <= _Words; ++_Idx) {
if (_Array[_Idx] != 0) {
_Xoflo(); // fail if any high-order words are nonzero
}
if _CONSTEXPR_IF (_Bits_zero) {
return 0;
} else {
if _CONSTEXPR_IF (_Bits_large) {
for (size_t _Idx = 1; _Idx <= _Words; ++_Idx) {
if (_Array[_Idx] != 0) {
_Xoflo(); // fail if any high-order words are nonzero
}
}
}

return _Array[0];
}
Expand Down Expand Up @@ -431,10 +423,9 @@ private:

void _Trim() noexcept { // clear any trailing bits in last word
constexpr bool _Work_to_do = _Bits == 0 || _Bits % _Bitsperword != 0;
if
_CONSTEXPR_IF(_Work_to_do) {
_Array[_Words] &= (_Ty{1} << _Bits % _Bitsperword) - 1;
}
if _CONSTEXPR_IF (_Work_to_do) {
_Array[_Words] &= (_Ty{1} << _Bits % _Bitsperword) - 1;
}
}

bitset& _Set_unchecked(size_t _Pos, bool _Val) noexcept { // set bit at _Pos to _Val, no checking
Expand Down Expand Up @@ -534,12 +525,11 @@ basic_istream<_Elem, _Tr>& operator>>(basic_istream<_Elem, _Tr>& _Istr, bitset<_

constexpr bool _Has_bits = _Bits > 0;

if
_CONSTEXPR_IF(_Has_bits) {
if (!_Changed) {
_State |= _Istr_t::failbit;
}
if _CONSTEXPR_IF (_Has_bits) {
if (!_Changed) {
_State |= _Istr_t::failbit;
}
}

_Istr.setstate(_State);
_Right = bitset<_Bits>(_Str); // convert string and store
Expand Down
Loading