Skip to content
Merged
14 changes: 7 additions & 7 deletions stl/inc/cmath
Original file line number Diff line number Diff line change
Expand Up @@ -1246,8 +1246,8 @@ template <class _Ty>
_NODISCARD constexpr _Ty _Common_lerp(const _Ty _ArgA, const _Ty _ArgB, const _Ty _ArgT) noexcept {
// on a line intersecting {(0.0, _ArgA), (1.0, _ArgB)}, return the Y value for X == _ArgT

const bool _T_is_finite = _STD _Is_finite(_ArgT);
if (_T_is_finite && _STD _Is_finite(_ArgA) && _STD _Is_finite(_ArgB)) {
const bool _T_is_finite = _Is_finite(_ArgT);
if (_T_is_finite && _Is_finite(_ArgA) && _Is_finite(_ArgB)) {
// 99% case, put it first; this block comes from P0811R3
if ((_ArgA <= 0 && _ArgB >= 0) || (_ArgA >= 0 && _ArgB <= 0)) {
// exact, monotonic, bounded, determinate, and (for _ArgA == _ArgB == 0) consistent:
Expand Down Expand Up @@ -1276,24 +1276,24 @@ _NODISCARD constexpr _Ty _Common_lerp(const _Ty _ArgA, const _Ty _ArgB, const _T
}

if (_STD is_constant_evaluated()) {
if (_STD _Is_nan(_ArgA)) {
if (_Is_nan(_ArgA)) {
return _ArgA;
}

if (_STD _Is_nan(_ArgB)) {
if (_Is_nan(_ArgB)) {
return _ArgB;
}

if (_STD _Is_nan(_ArgT)) {
if (_Is_nan(_ArgT)) {
return _ArgT;
}
} else {
// raise FE_INVALID if at least one of _ArgA, _ArgB, and _ArgT is signaling NaN
if (_STD _Is_nan(_ArgA) || _STD _Is_nan(_ArgB)) {
if (_Is_nan(_ArgA) || _Is_nan(_ArgB)) {
return (_ArgA + _ArgB) + _ArgT;
}

if (_STD _Is_nan(_ArgT)) {
if (_Is_nan(_ArgT)) {
return _ArgT + _ArgT;
}
}
Expand Down
6 changes: 3 additions & 3 deletions stl/inc/numeric
Original file line number Diff line number Diff line change
Expand Up @@ -615,15 +615,15 @@ template <class _Ty, enable_if_t<is_arithmetic_v<_Ty> && !is_same_v<remove_cv_t<
_NODISCARD constexpr _Ty midpoint(const _Ty _Val1, const _Ty _Val2) noexcept {
if constexpr (is_floating_point_v<_Ty>) {
if (_STD is_constant_evaluated()) {
if (_STD _Is_nan(_Val1)) {
if (_Is_nan(_Val1)) {
return _Val1;
}

if (_STD _Is_nan(_Val2)) {
if (_Is_nan(_Val2)) {
return _Val2;
}
} else {
if (_STD _Is_nan(_Val1) || _STD _Is_nan(_Val2)) {
if (_Is_nan(_Val1) || _Is_nan(_Val2)) {
// raise FE_INVALID if at least one of _Val1 and _Val2 is signaling NaN
return _Val1 + _Val2;
}
Expand Down
6 changes: 3 additions & 3 deletions stl/src/filesys.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,9 @@ _FS_DLL unsigned long long __CLRCALL_PURE_OR_CDECL _File_size(const wchar_t* _Fn
// 1600 is excluded, 1700/1800 are not leap years
// 1 partial century with 17 leap years:
// 1900 is not a leap year
// 1904 is leap year #1
// 1908 is leap year #2
// 1968 is leap year #17
// 1904 is leap year number 1
// 1908 is leap year number 2
// 1968 is leap year number 17


constexpr uint64_t _Win_ticks_per_second = 10000000ULL;
Expand Down
20 changes: 10 additions & 10 deletions tests/std/include/floating_point_test_cases.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,13 @@ constexpr std::pair<const char*, uint64_t> floating_point_test_cases_double[] =
{"2.2250738585072004e-308", 0x000FFFFFFFFFFFFEULL},
{"2.2250738585072010e-308", 0x000FFFFFFFFFFFFFULL},

// DevDiv#576315 "I/O library incorrect rounds floating point numbers on input"
// DevDiv#616647 "Visual C++ 11: iostream bug: incorrect input streaming of the smallest normal double and some
// DevDiv-576315 "I/O library incorrect rounds floating point numbers on input"
// DevDiv-616647 "Visual C++ 11: iostream bug: incorrect input streaming of the smallest normal double and some
// denormals"
// DevDiv#730414 "iostreams is still misparsing floating-point"
// DevDiv#938627 "parsing float values using std::istream gives results inconsistent with sscanf() and with C++
// DevDiv-730414 "iostreams is still misparsing floating-point"
// DevDiv-938627 "parsing float values using std::istream gives results inconsistent with sscanf() and with C++
// compiler"
// DevDiv#961116 "floating point string conversion accuracy"
// DevDiv-961116 "floating point string conversion accuracy"
{"2.2250738585072014e-308", 0x0010000000000000ULL}, // DBL_MIN
{"1.7976931348623158e+308", 0x7FEFFFFFFFFFFFFFULL}, // DBL_MAX
{"4.26144921954407e-309", 0x00031076B2F00000ULL},
Expand Down Expand Up @@ -257,13 +257,13 @@ constexpr std::pair<const char*, uint32_t> floating_point_test_cases_float[] = {
{"1.1754940705625946e-38", 0x007FFFFEU},
{"1.1754942106924411e-38", 0x007FFFFFU},

// DevDiv#576315 "I/O library incorrect rounds floating point numbers on input"
// DevDiv#616647 "Visual C++ 11: iostream bug: incorrect input streaming of the smallest normal double and some
// DevDiv-576315 "I/O library incorrect rounds floating point numbers on input"
// DevDiv-616647 "Visual C++ 11: iostream bug: incorrect input streaming of the smallest normal double and some
// denormals"
// DevDiv#730414 "iostreams is still misparsing floating-point"
// DevDiv#938627 "parsing float values using std::istream gives results inconsistent with sscanf() and with C++
// DevDiv-730414 "iostreams is still misparsing floating-point"
// DevDiv-938627 "parsing float values using std::istream gives results inconsistent with sscanf() and with C++
// compiler"
// DevDiv#961116 "floating point string conversion accuracy"
// DevDiv-961116 "floating point string conversion accuracy"
{"1.175494351e-38", 0x00800000U}, // FLT_MIN
{"3.402823466e+38", 0x7F7FFFFFU}, // FLT_MAX
{"179.9999999999999855", 0x43340000U},
Expand Down
6 changes: 3 additions & 3 deletions tests/std/include/instantiate_algorithms_op_deref.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

#include <instantiate_algorithms.hpp>

// DevDiv#758138 "Several algorithms break with iterators that overload the comma operator."
// DevDiv#758134 "uninitialized_copy and uninitialized_copy_n break with classes that overload operator &."
// DevDiv-758138 "Several algorithms break with iterators that overload the comma operator."
// DevDiv-758134 "uninitialized_copy and uninitialized_copy_n break with classes that overload operator &."

// ADL will search this namespace for op,().
namespace Meow {
Expand Down Expand Up @@ -310,7 +310,7 @@ void test() {
Meow::BasicBidIt<true>{}, Meow::BasicRanIt<true>{}, Meow::BasicOutIt<true>{11, 22});
}

// Also test DevDiv#938759 "<type_traits>: is_assignable should tolerate overloaded comma operators [libcxx]".
// Also test DevDiv-938759 "<type_traits>: is_assignable should tolerate overloaded comma operators [libcxx]".
#define STATIC_ASSERT(...) static_assert(__VA_ARGS__, #__VA_ARGS__)

STATIC_ASSERT(std::is_assignable_v<Meow::Evil&, Meow::Evil>);
Expand Down
2 changes: 1 addition & 1 deletion tests/std/tests/Dev09_119644_compiler_option_gz/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ int main() {
#else
int __cdecl main() {
#endif
// Test Dev10#465793 "iostreams: <locale> is incompatible with /Gr and /Gz".
// Test Dev10-465793 "iostreams: <locale> is incompatible with /Gr and /Gz".
std::locale loc("english_US");
}
2 changes: 1 addition & 1 deletion tests/std/tests/Dev09_153419_tr1_allocators/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ int main() {
#endif // _HAS_FUNCTION_ALLOCATOR_SUPPORT

{
// Test Dev10#531321 "function: tr1::function memory leak".
// Test Dev10-531321 "function: tr1::function memory leak".

Big b(10, 20, 30, 40);
function<ull_t()> f;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ void assert_throws(Fx fn) noexcept {
}
}

// Test DDB#158181. unordered_set.swap() was O(N), throwing, and invalidating iterators, which was bad.
// Test DDB-158181. unordered_set.swap() was O(N), throwing, and invalidating iterators, which was bad.
void test_ddb_158181() {
unordered_set<int> x;
x.insert(11);
Expand Down
2 changes: 1 addition & 1 deletion tests/std/tests/Dev09_172666_tr1_tuple_odr/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace fs = std::experimental::filesystem;
int meow();

inline bool test_wchar_t_minus() {
// Test for DevDiv Bug#1004799: <filesystem>: /Zc:wchar_t- explodes. Calling file_size
// Test for DevDiv-1004799: <filesystem>: /Zc:wchar_t- explodes. Calling file_size
// should cause the blow-up to occur if we are wchar_t incorrect. Test is disabled
// (i.e. always passes) if compiled with /clr:pure and /Zc:wchar_t-, as it triggers
// LNK2031: calling convention missing in metadata errors, which are irrelevant here.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ void test_orig() {
}


// DevDiv#294051 "<functional>: std::function has lost the ability to invoke PMFs/PMDs on various things"
// DevDiv-294051 "<functional>: std::function has lost the ability to invoke PMFs/PMDs on various things"

// FDIS 20.8.11.2 [func.wrap.func] specifies:
// template<class R, class... ArgTypes> class function<R(ArgTypes...)>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ void microtest() {
using fp_t = void (*)();
template <typename URNG>
void add_tests(vector<fp_t>& tests) {
// Test DevDiv#83370 "uniform_int_distribution isn't uniform".
// Test DevDiv-83370 "uniform_int_distribution isn't uniform".
tests.insert(
tests.end(), {
microtest<URNG, int16_t, INT16_MIN, INT16_MAX>,
Expand All @@ -55,7 +55,7 @@ void add_tests(vector<fp_t>& tests) {
microtest<URNG, uint32_t, 2, UINT32_MAX - 3>,
microtest<URNG, int64_t, INT64_MIN, INT64_MAX>,
microtest<URNG, int64_t, INT64_MIN + 2, INT64_MAX - 3>,
microtest<URNG, uint64_t, 0, UINT64_MAX>, // Test DDB#181509 "TR1 VC9 SP1: Infinite loop in
microtest<URNG, uint64_t, 0, UINT64_MAX>, // Test DDB-181509 "TR1 VC9 SP1: Infinite loop in
// uniform_int<unsigned long long>::_Eval()".
microtest<URNG, uint64_t, 2, UINT64_MAX - 3>,

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ struct X : enable_shared_from_this<X> {
};

int main() {
// Test DDB#196243 "TR1 VC9 SP1: enable_shared_from_this's copy ctor and copy assignment operator do too much work".
// Test DDB-196243 "TR1 VC9 SP1: enable_shared_from_this's copy ctor and copy assignment operator do too much work".
{
const shared_ptr<X> sp1(new X(11));
const shared_ptr<X> sp2(new X(22));
Expand All @@ -37,7 +37,7 @@ int main() {
assert(raw2->shared_from_this() != sp1);
}

// Test DDB#197048 "[VS2008 / TR1] still got problems with shared_ptr<const T>".
// Test DDB-197048 "[VS2008 / TR1] still got problems with shared_ptr<const T>".
{
shared_ptr<const int> sp1(static_cast<const int*>(new int(6)));
shared_ptr<volatile int> sp2(static_cast<volatile int*>(new int(7)));
Expand All @@ -48,7 +48,7 @@ int main() {
assert(*sp3 == 8);
}

// Test Dev10#654944 "shared_ptr: assignment is messed up".
// Test Dev10-654944 "shared_ptr: assignment is messed up".
{
shared_ptr<int> p(new int(1729));
shared_ptr<int> z;
Expand All @@ -63,7 +63,7 @@ int main() {
assert(!z);
}

// Test DevDiv#1178296 "<memory>: shared_ptr<volatile X> doesn't work with enable_shared_from_this<X>".
// Test DevDiv-1178296 "<memory>: shared_ptr<volatile X> doesn't work with enable_shared_from_this<X>".
{
const auto sp1 = make_shared<const X>(100);
const auto sp2 = make_shared<volatile X>(200);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

// Dev10#544258 "STL/xutility: Debug validation of predicate classes fail on bound predicates"
// DevDiv#813065 "<algorithm>: C++ stdlib comparator debugging breaks compile of custom Comparators in std::equal_range
// Dev10-544258 "STL/xutility: Debug validation of predicate classes fail on bound predicates"
// DevDiv-813065 "<algorithm>: C++ stdlib comparator debugging breaks compile of custom Comparators in std::equal_range
// family of functions"

#include <algorithm>
Expand Down
4 changes: 2 additions & 2 deletions tests/std/tests/Dev10_561430_list_and_tree_leaks/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

int g_mallocs = 0;

// Also test DevDiv#483844 and DevDiv#781187, minimal allocator requirements.
// Also test DevDiv-483844 and DevDiv-781187, minimal allocator requirements.
template <typename T>
struct Mallocator {
typedef T value_type;
Expand Down Expand Up @@ -192,7 +192,7 @@ int main() {
}


// Also test DevDiv#819467 "<memory>: Custom allocator with virtual max_size function causes infinite recursion".
// Also test DevDiv-819467 "<memory>: Custom allocator with virtual max_size function causes infinite recursion".

template <typename T>
struct WeirdAllocator {
Expand Down
4 changes: 2 additions & 2 deletions tests/std/tests/Dev10_635436_shared_ptr_reset/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ Kitten::~Kitten() {
}

int main() {
// Dev10#635436 "shared_ptr: reset() must behave as if it is implemented with swap()"
// Dev10-635436 "shared_ptr: reset() must behave as if it is implemented with swap()"
results.emplace_back("BEGIN", 0);

Cat* p0 = new Cat(1729);
Expand Down Expand Up @@ -152,7 +152,7 @@ int main() {
results.emplace_back("END", 3);


// DevDiv#523246 "std::unique_ptr deletes owned object before resetting pointer rather than after."
// DevDiv-523246 "std::unique_ptr deletes owned object before resetting pointer rather than after."
results.emplace_back("BEGIN", 4);

Kitten* p4 = new Kitten(257);
Expand Down
2 changes: 1 addition & 1 deletion tests/std/tests/Dev10_682964_stable_sort_warnings/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ int main() {


{
// Also test DevDiv#957501 "<algorithm>: stable_sort calls self-move-assignment operator".
// Also test DevDiv-957501 "<algorithm>: stable_sort calls self-move-assignment operator".

class NoSelfMove {
public:
Expand Down
4 changes: 2 additions & 2 deletions tests/std/tests/Dev10_722102_shared_ptr_nullptr/test.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

// Dev10#722102 "STL: Get nullptr overloads"
// DevDiv#520681 "Faulty implementation of shared_ptr(nullptr_t) constructor"
// Dev10-722102 "STL: Get nullptr overloads"
// DevDiv-520681 "Faulty implementation of shared_ptr(nullptr_t) constructor"

#include <assert.h>
#include <functional>
Expand Down
2 changes: 1 addition & 1 deletion tests/std/tests/Dev10_766948_insert_ambiguity/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

using namespace std;

// Dev10#766948 "STL: insert() ambiguity in all associative containers except map and set"
// Dev10-766948 "STL: insert() ambiguity in all associative containers except map and set"
// LWG-2005 "unordered_map::insert(T&&) protection should apply to map too"
// LWG-2354 "Unnecessary copying when inserting into maps with braced-init syntax"

Expand Down
6 changes: 3 additions & 3 deletions tests/std/tests/Dev10_860410_bitset_ctors/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ int main() {
test_Getword();
}

// Also test DevDiv#917456 "<bitset>: none() and any() return incorrect count after call set() function in a
// Also test DevDiv-917456 "<bitset>: none() and any() return incorrect count after call set() function in a
// std::bitset<0> object [libcxx]".
void test_bitset0(const bitset<0>& b) {
assert(b.to_ulong() == 0);
Expand Down Expand Up @@ -182,7 +182,7 @@ void test_DevDiv917456() {
}
}

// Also test DevDiv#931383 "<bitset>: We need to validate all characters and use traits::eq()".
// Also test DevDiv-931383 "<bitset>: We need to validate all characters and use traits::eq()".
void test(const string& str, const size_t pos, const size_t n, const string& expected) noexcept {
try {
bitset<8> b(str, pos, n, 'o', 'i');
Expand Down Expand Up @@ -215,7 +215,7 @@ void test_DevDiv931383() {
test("FFiioiiiGG", 2, 6, "00110111");
}

// Also test Dev10#479284 "C6326 when running static analysis with <bitset>".
// Also test Dev10-479284 "C6326 when running static analysis with <bitset>".
template class std::bitset<7>;
template class std::bitset<32>;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ int main() {
test_391805();
}

// Also test Dev10#391805 "STL: Prefast error in deque".
// Also test Dev10-391805 "STL: Prefast error in deque".

void test_391805() {
deque<int> d;
Expand Down
4 changes: 2 additions & 2 deletions tests/std/tests/Dev10_908702_string_memory_leak/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ int main() {
assert(!_CrtDumpMemoryLeaks());
#endif

// Also test DevDiv#846054 "<locale>: Spurious memory leaks".
// Also test DevDiv-846054 "<locale>: Spurious memory leaks".
locale::global(locale(""));

#ifdef _DEBUG
assert(!_CrtDumpMemoryLeaks());
#endif
}

// Also test DevDiv#810608 "<xlocale>: [torino][boost]error C2665:
// Also test DevDiv-810608 "<xlocale>: [torino][boost]error C2665:
// 'std::_Crt_new_delete::operator new' : none of the 2 overloads could convert all the argument types".
void meow(void* pv) {
// Saying "new" instead of "::new" is intentional here.
Expand Down
8 changes: 4 additions & 4 deletions tests/std/tests/Dev11_0000000_quoted/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,12 +169,12 @@ int main() {

// Also test VSO-666592 "std::quoted fails to properly extract delimiter"
{
const std::string expectedStrings[] = {
const string expectedStrings[] = {
"spaces"s, "with"s, "some quote"s, "and another quote"s, "then"s, "more"s, "spaces"s};
std::istringstream iss13(R"(spaces with "some quote" "and another quote" then more spaces)");
std::string out;
istringstream iss13(R"(spaces with "some quote" "and another quote" then more spaces)");
string out;
for (const auto& expected : expectedStrings) {
iss13 >> std::quoted(out);
iss13 >> quoted(out);
assert(!iss13.fail());
assert(out == expected);
}
Expand Down
4 changes: 2 additions & 2 deletions tests/std/tests/Dev11_0000000_tuple_cat/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ int main() {
}
}

// Also test DevDiv#1205400 "C++ compiler: static_assert in std::tuple_element prevents SFINAE".
// Also test DevDiv-1205400 "C++ compiler: static_assert in std::tuple_element prevents SFINAE".
template <typename T, typename = void>
struct HasTupleElement : false_type {};

Expand All @@ -221,7 +221,7 @@ struct HasTupleElement<T, void_t<tuple_element_t<0, T>>> : true_type {};
STATIC_ASSERT(!HasTupleElement<int>::value);
STATIC_ASSERT(HasTupleElement<tuple<short, long>>::value);

// Also test DevDiv#1192603 "<tuple>: tuple_size's static_assert is problematic".
// Also test DevDiv-1192603 "<tuple>: tuple_size's static_assert is problematic".
template <typename T, typename = void>
struct HasTupleSize : false_type {};

Expand Down
Loading