Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
122 commits
Select commit Hold shift + click to select a range
7f4bbce
Merge pull request #1177 from microsoft/master
StephanTLavavej Aug 10, 2020
1125262
Merge pull request #1187 from microsoft/master
StephanTLavavej Aug 12, 2020
2021528
Merge pull request #1235 from microsoft/master
Aug 27, 2020
db81914
Merge pull request #1279 from microsoft/master
Sep 8, 2020
5ec6ff6
Merge pull request #1297 from microsoft/master
StephanTLavavej Sep 16, 2020
b10d526
feature/format arg_id parsing, align parsing, width parsing, skeleton…
Sep 22, 2020
7e36734
Merge branch 'main' into ff
CaseyCarter Oct 9, 2020
699a195
Merge pull request #1361 from CaseyCarter/feature_format_update
CaseyCarter Oct 9, 2020
0668a74
[feature/format] add parse_precision. (#1333)
Oct 16, 2020
8de7213
Merge pull request #1379 from microsoft/master
CaseyCarter Oct 17, 2020
5ce5928
Merge pull request #1403 from microsoft/master
StephanTLavavej Oct 27, 2020
a5fd69b
[feature/format] parse format specs (#1378)
Nov 12, 2020
8ea4749
Merge pull request #1469 from microsoft/master
StephanTLavavej Nov 14, 2020
9d7ffa8
Merge pull request #1525 from microsoft/master
StephanTLavavej Dec 11, 2020
67197c1
Merge pull request #1536 from microsoft/master
StephanTLavavej Dec 17, 2020
1877068
Merge pull request #1568 from microsoft/master
StephanTLavavej Jan 12, 2021
b0edef8
Merge pull request #1578 from microsoft/master
StephanTLavavej Jan 22, 2021
0e595d8
Merge branch 'main' into merge_format
StephanTLavavej Feb 3, 2021
3460df5
Unskip format.error/format.error.pass.cpp.
StephanTLavavej Feb 3, 2021
18bbe7d
Merge pull request #1614 from StephanTLavavej/merge_format
Feb 3, 2021
dfb9396
charconv internal functions for wchar_t buffers (#1587)
MattStephanson Feb 4, 2021
988f4be
Add tests for basic_format_parse_context (#1597)
miscco Feb 6, 2021
a52214a
Implement a packed format store (#1625)
miscco Feb 12, 2021
d29bd5b
Merge branch 'main' into merge_format
StephanTLavavej Feb 13, 2021
e0ad338
Merge pull request #1643 from StephanTLavavej/merge_format
StephanTLavavej Feb 13, 2021
0d877f8
Merge branch 'main' into feature/format
CaseyCarter Feb 17, 2021
32455b2
Merge pull request #1656 from CaseyCarter/feature/format
CaseyCarter Feb 17, 2021
286fe46
std::format parsing callbacks and machinery (#1616)
Feb 18, 2021
99e8a2d
<format>: vformat_to parsing and escaping tests (#1661)
Feb 19, 2021
62e9bbe
<format>: initial replacement field tests (and numeric arg indexing) …
Feb 24, 2021
9213d35
<format>: Fix _Get_format_arg_storage_type (#1696)
Feb 26, 2021
ad71e87
<format>: add no-spec formatting (#1695)
eldakesh-ms Mar 1, 2021
f861ff0
<format>: Enable void* and nullptr tests (#1705)
eldakesh-ms Mar 2, 2021
3a03973
call the specful writer for replacement fields with specs.
Mar 2, 2021
a16a5db
change width and precision to be signed, and add signed overload of _…
Mar 2, 2021
dd4ba28
check type to ensure it's in range.
Mar 2, 2021
b727bc7
Merge branch 'main' into merge_format
StephanTLavavej Mar 4, 2021
ba3dde8
Merge pull request #1717 from StephanTLavavej/merge_format
Mar 5, 2021
90306b5
Add leading zero
eldakesh-ms Mar 5, 2021
512775f
_STD qualify visit_format_arg
Mar 8, 2021
33d7b1c
use addressof instead of the operator
Mar 8, 2021
42e81d7
add a performance note to _On_type check
Mar 8, 2021
3823ac7
Merge pull request #1710 from barcharcraz/format_specs_plumbing
Mar 9, 2021
43331bb
<format>: formatting test organization (#1719)
Mar 9, 2021
261e10a
<format>: Add format, vformat, and local-less vformat_to (#1726)
eldakesh-ms Mar 10, 2021
3389b78
<format>: use new STR macro throughout formatting tests (#1729)
Mar 11, 2021
df93593
<format>: Add specful writers (#1738)
eldakesh-ms Mar 16, 2021
927a3b5
<format>: Add const to some parameters (#1745)
eldakesh-ms Mar 18, 2021
63f46ad
<format>: Add localized arg parsing support (#1746)
eldakesh-ms Mar 18, 2021
94116a6
<format>: basic custom formatter test (#1739)
Mar 19, 2021
06a85f0
<format>: Increase the buffer size for specful floats (#1766)
eldakesh-ms Mar 24, 2021
510efc3
<format>: Add localized specifier (#1767)
eldakesh-ms Mar 24, 2021
48864c8
<format>: Add format_to_n and formatted_size (#1790)
eldakesh-ms Mar 31, 2021
a78b9aa
<format>: Add format_to (#1793)
eldakesh-ms Mar 31, 2021
e500c6a
<format>: Standard formatter specializations (#1782)
Apr 1, 2021
fc1b784
<format>: Add _NODISCARD (#1796)
eldakesh-ms Apr 1, 2021
258b127
Merge branch 'main' into merge_format
StephanTLavavej Apr 6, 2021
7585f57
Merge pull request #1807 from StephanTLavavej/merge_format
Apr 6, 2021
30e99e4
<format>: Fix arg overload resolution (#1804)
eldakesh-ms Apr 7, 2021
334308a
<format>: Allow move-only output iterators (#1795)
eldakesh-ms Apr 7, 2021
fb36135
<format>: remove todos, add feature macro (#1811)
Apr 8, 2021
970bff2
`[time.format]` setup (#1812)
mnatsuhara Apr 9, 2021
e5e024a
<format> Properly handle multibyte encodings in format strings (#1815)
CaseyCarter Apr 9, 2021
4d7d4f1
<format>: Add header unit test (#1816)
eldakesh-ms Apr 10, 2021
3708eea
<format> tests from libfmt (#1817)
Apr 10, 2021
b98d6d0
<format>: Fix #1818, precision on altenrative general formatting (#1819)
eldakesh-ms Apr 10, 2021
de11c9a
Fix format("{:F}", Inf or NaN) (#1823)
statementreply Apr 10, 2021
817069b
Code review: Adjust newlines.
StephanTLavavej Apr 10, 2021
4dc999c
Code review: Add const.
StephanTLavavej Apr 10, 2021
b68c1b4
Code review: Add noexcept.
StephanTLavavej Apr 10, 2021
ca581bd
Code review: Fix comment typo.
StephanTLavavej Apr 10, 2021
7a80958
Code review: Shrink "clang-format off" region.
StephanTLavavej Apr 10, 2021
4c2e42e
Code review: Refactor postincrement.
StephanTLavavej Apr 10, 2021
8953f9c
Code review: Avoid negated condition.
StephanTLavavej Apr 10, 2021
6d41457
Code review: Early return in _Count_separators().
StephanTLavavej Apr 11, 2021
ff0ea8d
Code review: Rearrange constexpr variables, use auto.
StephanTLavavej Apr 11, 2021
97b3e6f
Code review: Move comment.
StephanTLavavej Apr 11, 2021
f4fa25f
Code review: Remove perf note, compilers optimize this.
StephanTLavavej Apr 11, 2021
6ddd77d
Code review: Explicitly cast from int to unsigned long long.
StephanTLavavej Apr 11, 2021
176c603
Code review: Move _Get_format_arg_type_storage_size's definition.
StephanTLavavej Apr 11, 2021
339b67a
Update header-units.json.
StephanTLavavej Apr 11, 2021
acd12a7
Use the plain concepts_matrix.lst when possible.
StephanTLavavej Apr 11, 2021
ddcba05
Silence "expression is always false" warning.
StephanTLavavej Apr 12, 2021
fe38474
Refine the xlocnum workaround.
StephanTLavavej Apr 12, 2021
f4c0d09
Defend against macroized signbit, isnan, isinf.
StephanTLavavej Apr 12, 2021
e1d0081
Use _THROW.
StephanTLavavej Apr 12, 2021
7e0c874
Improve locale testing.
StephanTLavavej Apr 12, 2021
fa256ee
Work around VSO-1309454 (duplicated deduction guides).
StephanTLavavej Apr 12, 2021
a4a56cb
Add const.
StephanTLavavej Apr 12, 2021
f71dadc
Add missing `_WIDEN(_CharT, '.')`.
StephanTLavavej Apr 12, 2021
12c3581
Add const, verify __d2s_buffered_n() etc. succeeded.
StephanTLavavej Apr 13, 2021
b81d9eb
<format>: Assume UTF-8 format strings when execution charset is UTF-8…
statementreply Apr 13, 2021
ff016ec
Merge branch 'feature/format' into merging_format
StephanTLavavej Apr 13, 2021
7146857
Include more headers.
StephanTLavavej Apr 13, 2021
c7d570c
Rename integral to Integral to avoid shadowing the concept.
StephanTLavavej Apr 13, 2021
bec21d4
Change _Align and _Sign's underlying type to uint8_t.
StephanTLavavej Apr 13, 2021
2e95f19
4-bit bitfield requires strictly less than 16.
StephanTLavavej Apr 13, 2021
6aad047
Style: Add newlines.
StephanTLavavej Apr 13, 2021
34a4572
Bugfix: Add missing typedefs.
StephanTLavavej Apr 13, 2021
87755dc
basic_format_arg::handle should store a __cdecl function pointer.
StephanTLavavej Apr 13, 2021
a0f0c02
basic_format_arg::handle::format is const in the Standard.
StephanTLavavej Apr 13, 2021
e9e7e43
Bugfix: visit_format_arg() must return decltype(auto).
StephanTLavavej Apr 13, 2021
2cd72e6
Style: constexpr explicit is conventional.
StephanTLavavej Apr 13, 2021
46e8971
Add _NODISCARD to _Find_encoded().
StephanTLavavej Apr 13, 2021
0f4dd38
Style: Use braces to construct temporaries.
StephanTLavavej Apr 13, 2021
f2b2a6c
Style: Avoid shadowing, remove unnecessary static_cast.
StephanTLavavej Apr 13, 2021
95958fe
alignas(_Index_type) _Format_arg_store::_Storage, fix comment.
StephanTLavavej Apr 13, 2021
8246a76
Improve comments.
StephanTLavavej Apr 13, 2021
110bc90
Style: Adjust spacing.
StephanTLavavej Apr 13, 2021
d1fad54
Style: When declaring functions, don't mark value params as const.
StephanTLavavej Apr 13, 2021
d2b6ebb
Use isfinite for simplicity.
StephanTLavavej Apr 13, 2021
0acf9ec
Style: Use _Nx for N (it's not a type, or a number of types).
StephanTLavavej Apr 13, 2021
7bbec5b
Big rename: _Align to _Fmt_align.
StephanTLavavej Apr 13, 2021
a04936d
Big rename: _Sign to _Fmt_sign.
StephanTLavavej Apr 13, 2021
baf1fbc
move monostate.
Apr 13, 2021
c3a056c
fix bad clang-format formatting.
Apr 13, 2021
75bac5e
Merge branch 'main' into merging_format
StephanTLavavej Apr 14, 2021
14df470
add tests for runtime width from libfmt + bugfix from encoding PR.
Apr 14, 2021
d62f42b
Merge branch 'merging_format' of https://github.com/barcharcraz/stl i…
Apr 14, 2021
9612cce
verify range in advance_to
Apr 14, 2021
e8496c6
_Adl_verify_range the correct range
Apr 14, 2021
c572f7e
Fix intrinsic usage for _M_ARM64EC.
StephanTLavavej Apr 15, 2021
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
30 changes: 30 additions & 0 deletions NOTICE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -137,3 +137,33 @@ In addition, certain files include the notices provided below.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

----------------------

// Copyright (c) 2012 - present, Victor Zverovich
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.

// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
// --- Optional exception to the license ---
//
// As an exception, if, as a result of your compiling your source code, portions
// of this Software are embedded into a machine-executable object form of such
// source code, you may redistribute such embedded portions in such object form
// without including the above copyright and permission notices.
9 changes: 9 additions & 0 deletions docs/cgmanifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,15 @@
}
}
},
{
"component": {
"type": "git",
"git": {
"repositoryUrl": "https://github.com/fmtlib/fmt",
"commitHash": "273d8865e31659f69528623754c1742b2819ad26"
}
}
},
{
"component": {
"type": "git",
Expand Down
1 change: 1 addition & 0 deletions stl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ set(HEADERS
${CMAKE_CURRENT_LIST_DIR}/inc/experimental/unordered_set
${CMAKE_CURRENT_LIST_DIR}/inc/experimental/vector
${CMAKE_CURRENT_LIST_DIR}/inc/filesystem
${CMAKE_CURRENT_LIST_DIR}/inc/format
${CMAKE_CURRENT_LIST_DIR}/inc/forward_list
${CMAKE_CURRENT_LIST_DIR}/inc/fstream
${CMAKE_CURRENT_LIST_DIR}/inc/functional
Expand Down
1 change: 1 addition & 0 deletions stl/inc/__msvc_all_public_headers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@
#include <deque>
#include <exception>
#include <filesystem>
#include <format>
#include <forward_list>
#include <fstream>
#include <functional>
Expand Down
123 changes: 0 additions & 123 deletions stl/inc/algorithm
Original file line number Diff line number Diff line change
Expand Up @@ -383,39 +383,6 @@ namespace ranges {
};

inline constexpr _For_each_n_fn for_each_n{_Not_quite_object::_Construct_tag{}};

// VARIABLE ranges::find
class _Find_fn : private _Not_quite_object {
public:
using _Not_quite_object::_Not_quite_object;

// clang-format off
template <input_iterator _It, sentinel_for<_It> _Se, class _Ty, class _Pj = identity>
requires indirect_binary_predicate<ranges::equal_to, projected<_It, _Pj>, const _Ty*>
_NODISCARD constexpr _It operator()(_It _First, _Se _Last, const _Ty& _Val, _Pj _Proj = {}) const {
_Adl_verify_range(_First, _Last);
auto _UResult = _RANGES _Find_unchecked(
_Get_unwrapped(_STD move(_First)), _Get_unwrapped(_STD move(_Last)), _Val, _Pass_fn(_Proj));

_Seek_wrapped(_First, _STD move(_UResult));
return _First;
}

template <input_range _Rng, class _Ty, class _Pj = identity>
requires indirect_binary_predicate<ranges::equal_to, projected<iterator_t<_Rng>, _Pj>, const _Ty*>
_NODISCARD constexpr borrowed_iterator_t<_Rng> operator()(
_Rng&& _Range, const _Ty& _Val, _Pj _Proj = {}) const {
auto _First = _RANGES begin(_Range);
auto _UResult =
_RANGES _Find_unchecked(_Get_unwrapped(_STD move(_First)), _Uend(_Range), _Val, _Pass_fn(_Proj));

_Seek_wrapped(_First, _STD move(_UResult));
return _First;
}
// clang-format on
};

inline constexpr _Find_fn find{_Not_quite_object::_Construct_tag{}};
} // namespace ranges
#endif // __cpp_lib_concepts

Expand Down Expand Up @@ -1366,60 +1333,6 @@ namespace ranges {

inline constexpr _None_of_fn none_of{_Not_quite_object::_Construct_tag{}};

// ALIAS TEMPLATE copy_result
template <class _In, class _Out>
using copy_result = in_out_result<_In, _Out>;

// VARIABLE ranges::copy
// clang-format off
template <input_iterator _It, sentinel_for<_It> _Se, weakly_incrementable _Out>
requires indirectly_copyable<_It, _Out>
_NODISCARD constexpr copy_result<_It, _Out> _Copy_unchecked(_It _First, _Se _Last, _Out _Result) {
if constexpr (_Ptr_copy_cat<_It, _Out>::_Trivially_copyable && sized_sentinel_for<_Se, _It>) {
if (!_STD is_constant_evaluated()) {
auto _Final = _RANGES next(_First, _STD move(_Last));
_Result = _Copy_memmove(_STD move(_First), _Final, _STD move(_Result));
return {_STD move(_Final), _STD move(_Result)};
}
}

for (; _First != _Last; ++_First, (void) ++_Result) {
*_Result = *_First;
}

return {_STD move(_First), _STD move(_Result)};
}
// clang-format on

class _Copy_fn : private _Not_quite_object {
public:
using _Not_quite_object::_Not_quite_object;

// clang-format off
template <input_iterator _It, sentinel_for<_It> _Se, weakly_incrementable _Out>
requires indirectly_copyable<_It, _Out>
constexpr copy_result<_It, _Out> operator()(_It _First, _Se _Last, _Out _Result) const {
_Adl_verify_range(_First, _Last);
auto _UResult = _RANGES _Copy_unchecked(
_Get_unwrapped(_STD move(_First)), _Get_unwrapped(_STD move(_Last)), _STD move(_Result));
_Seek_wrapped(_First, _STD move(_UResult.in));
return {_STD move(_First), _STD move(_UResult.out)};
}

template <input_range _Rng, weakly_incrementable _Out>
requires indirectly_copyable<iterator_t<_Rng>, _Out>
constexpr copy_result<borrowed_iterator_t<_Rng>, _Out> operator()(_Rng&& _Range, _Out _Result) const {
auto _First = _RANGES begin(_Range);
auto _UResult =
_RANGES _Copy_unchecked(_Get_unwrapped(_STD move(_First)), _Uend(_Range), _STD move(_Result));
_Seek_wrapped(_First, _STD move(_UResult.in));
return {_STD move(_First), _STD move(_UResult.out)};
}
// clang-format on
};

inline constexpr _Copy_fn copy{_Not_quite_object::_Construct_tag{}};

// ALIAS TEMPLATE copy_n_result
template <class _In, class _Out>
using copy_n_result = in_out_result<_In, _Out>;
Expand Down Expand Up @@ -3520,42 +3433,6 @@ namespace ranges {

inline constexpr _Fill_fn fill{_Not_quite_object::_Construct_tag{}};

// VARIABLE ranges::fill_n
class _Fill_n_fn : private _Not_quite_object {
public:
using _Not_quite_object::_Not_quite_object;

template <class _Ty, output_iterator<const _Ty&> _It>
constexpr _It operator()(_It _First, iter_difference_t<_It> _Count, const _Ty& _Value) const {
if (_Count > 0) {
auto _UFirst = _Get_unwrapped_n(_STD move(_First), _Count);
if (!_STD is_constant_evaluated()) {
if constexpr (_Fill_memset_is_safe<decltype(_UFirst), _Ty>) {
_Fill_memset(_UFirst, _Value, static_cast<size_t>(_Count));
_Seek_wrapped(_First, _UFirst + _Count); // no need to move since _UFirst is a pointer
return _First;
} else if constexpr (_Fill_zero_memset_is_safe<decltype(_UFirst), _Ty>) {
if (_Is_all_bits_zero(_Value)) {
_Fill_zero_memset(_UFirst, static_cast<size_t>(_Count));
_Seek_wrapped(_First, _UFirst + _Count); // no need to move since _UFirst is a pointer
return _First;
}
}
}

for (; _Count > 0; ++_UFirst, (void) --_Count) {
*_UFirst = _Value;
}

_Seek_wrapped(_First, _STD move(_UFirst));
}

return _First;
}
};

inline constexpr _Fill_n_fn fill_n{_Not_quite_object::_Construct_tag{}};

// VARIABLE ranges::generate
class _Generate_fn : private _Not_quite_object {
public:
Expand Down
22 changes: 11 additions & 11 deletions stl/inc/bit
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ _NODISCARD constexpr int _Popcount_fallback(_Ty _Val) noexcept {
return static_cast<int>(_Val & static_cast<_Ty>(_Digits + _Digits - 1));
}

#if defined(_M_IX86) || defined(_M_X64)
#if defined(_M_IX86) || (defined(_M_X64) && !defined(_M_ARM64EC))

extern "C" {
extern int __isa_available;
Expand Down Expand Up @@ -207,7 +207,7 @@ _NODISCARD int _Checked_x86_x64_popcount(const _Ty _Val) noexcept {
#endif // _M_IX86
}
}
#endif // defined(_M_IX86) || defined(_M_X64)
#endif // defined(_M_IX86) || (defined(_M_X64) && !defined(_M_ARM64EC))


#if defined(_M_ARM) || defined(_M_ARM64)
Expand Down Expand Up @@ -255,17 +255,17 @@ _NODISCARD int _Checked_arm_arm64_countl_zero(const _Ty _Val) noexcept {

template <class _Ty, enable_if_t<_Is_standard_unsigned_integer<_Ty>, int> _Enabled>
_NODISCARD constexpr int countl_zero(const _Ty _Val) noexcept {
if (_STD is_constant_evaluated()) {
return _Countl_zero_fallback(_Val);
} else {
#if defined(_M_IX86) || defined(_M_X64)
#if defined(_M_IX86) || (defined(_M_X64) && !defined(_M_ARM64EC))
if (!_STD is_constant_evaluated()) {
return _Checked_x86_x64_countl_zero(_Val);
}
#elif defined(_M_ARM) || defined(_M_ARM64)
if (!_STD is_constant_evaluated()) {
return _Checked_arm_arm64_countl_zero(_Val);
#else
#error Unsupported Hardware
#endif
}
#endif // defined(_M_ARM) || defined(_M_ARM64)

return _Countl_zero_fallback(_Val);
}

template <class _Ty, enable_if_t<_Is_standard_unsigned_integer<_Ty>, int> = 0>
Expand All @@ -285,11 +285,11 @@ _NODISCARD constexpr int countr_one(const _Ty _Val) noexcept {

template <class _Ty, enable_if_t<_Is_standard_unsigned_integer<_Ty>, int> _Enabled = 0>
_NODISCARD constexpr int popcount(const _Ty _Val) noexcept {
#if defined(_M_IX86) || defined(_M_X64)
#if defined(_M_IX86) || (defined(_M_X64) && !defined(_M_ARM64EC))
if (!_STD is_constant_evaluated()) {
return _Checked_x86_x64_popcount(_Val);
}
#endif // defined(_M_IX86) || defined(_M_X64)
#endif // defined(_M_IX86) || (defined(_M_X64) && !defined(_M_ARM64EC))
return _Popcount_fallback(_Val);
}

Expand Down
Loading