Cleanup std qualification and old bug citations (#1119)

This commit is contained in:
Stephan T. Lavavej 2020-08-01 18:35:54 -07:00 коммит произвёл GitHub
Родитель e4b75dcd44
Коммит 12c684bba7
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
63 изменённых файлов: 162 добавлений и 162 удалений

Просмотреть файл

@ -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:
@ -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;
}
}

Просмотреть файл

@ -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;
}

Просмотреть файл

@ -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;

Просмотреть файл

@ -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},
@ -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},

Просмотреть файл

@ -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 {
@ -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>);

Просмотреть файл

@ -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");
}

Просмотреть файл

@ -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;

Просмотреть файл

@ -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);

Просмотреть файл

@ -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.

Просмотреть файл

@ -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...)>

Просмотреть файл

@ -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>,
@ -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>,

Просмотреть файл

@ -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));
@ -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)));
@ -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;
@ -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);

Просмотреть файл

@ -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>

Просмотреть файл

@ -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;
@ -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 {

Просмотреть файл

@ -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);
@ -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);

Просмотреть файл

@ -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:

Просмотреть файл

@ -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>

Просмотреть файл

@ -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"

Просмотреть файл

@ -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);
@ -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');
@ -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>;

Просмотреть файл

@ -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;

Просмотреть файл

@ -36,7 +36,7 @@ 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
@ -44,7 +44,7 @@ int main() {
#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.

Просмотреть файл

@ -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);
}

Просмотреть файл

@ -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 {};
@ -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 {};

Просмотреть файл

@ -55,7 +55,7 @@ int main() {
}
{
// Also test DevDiv#850453 "<vector>: Missing emplace methods in std::vector<bool> container".
// Also test DevDiv-850453 "<vector>: Missing emplace methods in std::vector<bool> container".
vector<bool> v(47, allocator<bool>());

Просмотреть файл

@ -18,7 +18,7 @@ using namespace std::placeholders;
#define STATIC_ASSERT(...) static_assert(__VA_ARGS__, #__VA_ARGS__)
// DevDiv#235721 "<future>: async() and packaged_task don't compile for void and T& return types"
// DevDiv-235721 "<future>: async() and packaged_task don't compile for void and T& return types"
void test_DevDiv_235721() {
auto void_lambda = []() {};
@ -52,7 +52,7 @@ void test_DevDiv_235721() {
}
// DevDiv#586551 "<future>: future_errc message() and what() don't work"
// DevDiv-586551 "<future>: future_errc message() and what() don't work"
void test_message(const future_errc fe, const string& s) {
assert(make_error_code(fe).message() == s);
@ -70,7 +70,7 @@ void test_DevDiv_586551() {
}
// DevDiv#725337 "<future>: std::packaged_task<T> where T is void or a reference class are not movable"
// DevDiv-725337 "<future>: std::packaged_task<T> where T is void or a reference class are not movable"
void test_DevDiv_725337() {
auto void_lambda = []() {};

Просмотреть файл

@ -1,7 +1,7 @@
// Copyright (c) Microsoft Corporation.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
// DevDiv#253803 "<algorithm>: merge() asserts when given null src/dest"
// DevDiv-253803 "<algorithm>: merge() asserts when given null src/dest"
#include <algorithm>
#include <assert.h>

Просмотреть файл

@ -156,7 +156,7 @@ void example() {
STATIC_ASSERT(!is_trivial_v<int&&>);
// DevDiv#517460 "is_*_constructible type traits are broken for reference types"
// DevDiv-517460 "is_*_constructible type traits are broken for reference types"
STATIC_ASSERT(is_copy_constructible_v<int&>);
STATIC_ASSERT(is_copy_constructible_v<const int&>);
STATIC_ASSERT(is_move_constructible_v<int&>);

Просмотреть файл

@ -170,7 +170,7 @@ int main() {
}
{
// Also test DevDiv#1210471 "std::rethrow_exception is not [[noreturn]]".
// Also test DevDiv-1210471 "std::rethrow_exception is not [[noreturn]]".
auto lambda = []() -> double { rethrow_exception(make_exception_ptr(1729)); };

Просмотреть файл

@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
// DevDiv#316853 "<algorithm>: find()'s memchr() optimization is incorrect"
// DevDiv#468500 "<algorithm>: find()'s memchr() optimization is insufficiently aggressive"
// DevDiv-316853 "<algorithm>: find()'s memchr() optimization is incorrect"
// DevDiv-468500 "<algorithm>: find()'s memchr() optimization is insufficiently aggressive"
#pragma warning(disable : 4389) // signed/unsigned mismatch
#pragma warning(disable : 4805) // '==': unsafe mix of type '_Ty' and type 'const _Ty' in operation
@ -30,7 +30,7 @@ bool operator==(int x, const Cat& c) {
}
int main() {
{ // DevDiv#316853 "<algorithm>: find()'s memchr() optimization is incorrect"
{ // DevDiv-316853 "<algorithm>: find()'s memchr() optimization is incorrect"
vector<signed char> v;
v.push_back(22);
v.push_back(33);

Просмотреть файл

@ -30,7 +30,7 @@ public:
int i;
};
int main() { // DevDiv#377755 "<thread>: thread's ctor doesn't compile with movable-only arguments"
int main() { // DevDiv-377755 "<thread>: thread's ctor doesn't compile with movable-only arguments"
std::vector<std::thread> t;
std::unique_ptr<int> p = std::make_unique<int>(-1);
// Check if std::thread ctor accepts move-only arguments.

Просмотреть файл

@ -6,7 +6,7 @@
#define STATIC_ASSERT(...) static_assert(__VA_ARGS__, #__VA_ARGS__)
// Regression test for:
// DevDiv2 #417110: is_scalar<nullptr_t> should be true
// DevDiv-417110: is_scalar<nullptr_t> should be true
int main() {

Просмотреть файл

@ -11,7 +11,7 @@
int main() {} // COMPILE-ONLY
// Regression test for DevDiv2 #453373 : codecvt_one_one compile errors
// Regression test for DevDiv-453373 : codecvt_one_one compile errors
// Make sure we can instantiate the types from the problem headers:
template class stdext::cvt::codecvt_one_one<wchar_t, 0xffffffff, std::little_endian>;

Просмотреть файл

@ -13,7 +13,7 @@
int main() {} // COMPILE-ONLY
// Regression test for DevDiv2 #483851 : [C++11] STL containers must use std::allocator_trait in debug mode
// Regression test for DevDiv-483851 : [C++11] STL containers must use std::allocator_traits in debug mode
template <typename T, typename Base>
struct simple_allocator : Base {

Просмотреть файл

@ -27,7 +27,7 @@ void assert_no_leaks() {
void test_484720();
int main() {
// DevDiv#452211 "<thread>: init_at_thread_exit_mutex() creates a spurious memory leak"
// DevDiv-452211 "<thread>: init_at_thread_exit_mutex() creates a spurious memory leak"
assert_no_leaks();
{
@ -54,7 +54,7 @@ int main() {
assert_no_leaks();
{
// DevDiv#485243 "Crash in runtime library (msvcr110.dll)"
// DevDiv-485243 "Crash in runtime library (msvcr110.dll)"
condition_variable cv;
mutex m;
@ -85,7 +85,7 @@ int main() {
assert_no_leaks();
{
// DevDiv#861298 "std::thread not fully initialized due to _Thr_set_null only setting id (not handle)"
// DevDiv-861298 "std::thread not fully initialized due to _Thr_set_null only setting id (not handle)"
// native_handle()'s behavior is unspecified, but CreateThread() and _beginthreadex()
// return null for failure, so this seems like a reasonable default.
@ -99,7 +99,7 @@ int main() {
}
// DevDiv#484720 "<condition_variable>: [c++std-lib-32966] Public service announcement concerning
// DevDiv-484720 "<condition_variable>: [c++std-lib-32966] Public service announcement concerning
// ~condition_variable_any()"
template <typename T>

Просмотреть файл

@ -29,7 +29,7 @@ struct Global {
Global global;
int main() {
// Also test DevDiv#781294 "<system_error>: Visual C++ 2013 RC system_category().equivalent function does not work".
// Also test DevDiv-781294 "<system_error>: Visual C++ 2013 RC system_category().equivalent function does not work".
const error_code code(ERROR_NOT_ENOUGH_MEMORY, system_category());
const error_condition cond = make_error_condition(errc::not_enough_memory);
@ -47,7 +47,7 @@ int main() {
}
// Also test DevDiv#833886 "<system_error>: comparisons should be free functions".
// Also test DevDiv-833886 "<system_error>: comparisons should be free functions".
bool test_code(const io_errc l, const error_code& r) {
return l == r && l != r && l < r;
}

Просмотреть файл

@ -685,7 +685,7 @@ STATIC_ASSERT(is_same_v<result_of_t<const Purr()>, long>);
STATIC_ASSERT(is_same_v<result_of_t<const Purr&()>, short>);
STATIC_ASSERT(is_same_v<result_of_t<const Purr && ()>, long>);
// Also test references to functions, DDB#198033.
// Also test references to functions, DDB-198033.
using FuncRef = int (&)(float, double);
STATIC_ASSERT(is_same_v<result_of_t<FuncRef(float, double)>, int>);
@ -724,7 +724,7 @@ int cube_noexcept(int n) noexcept {
}
// Test DevDiv#391117 "<functional> reference_wrapper: reference_wrapper doesn't compile with pure virtual function call
// Test DevDiv-391117 "<functional> reference_wrapper: reference_wrapper doesn't compile with pure virtual function call
// operators".
struct BaseMeow {
BaseMeow() {}
@ -751,7 +751,7 @@ void test_dev11_391117() {
}
// Test DevDiv#535636 "<functional> reference_wrapper: reference_wrapper<int (int)>::get() doesn't compile".
// Test DevDiv-535636 "<functional> reference_wrapper: reference_wrapper<int (int)>::get() doesn't compile".
void test_dev11_535636() {
reference_wrapper<int(int)> rw(triple);
@ -767,7 +767,7 @@ void test_dev11_535636() {
}
// Test DevDiv#794227 "<functional> reference_wrapper: ambiguous access of result_type - functional, xrefwrap".
// Test DevDiv-794227 "<functional> reference_wrapper: ambiguous access of result_type - functional, xrefwrap".
template <typename Arg, typename Result>
struct UnaryFunction {
typedef Arg argument_type;
@ -806,7 +806,7 @@ void test_dev11_794227() {
}
// Test DevDiv#868374 "<functional> reference_wrapper: Cannot assign a std::reference_wrapper object to another
// Test DevDiv-868374 "<functional> reference_wrapper: Cannot assign a std::reference_wrapper object to another
// std::reference_wrapper object [libcxx]".
void test_dev11_868374() {
reference_wrapper<int(int)> rw(triple);
@ -927,7 +927,7 @@ struct Thing {
class UnaryBinary {
public:
// Originally for testing Dev10#539137
// Originally for testing Dev10-539137
// "reference_wrapper: Doesn't handle classes that derive from both unary_function and binary_function".
// The typedefs are tested elsewhere here (see SameResults and DifferentResults).
@ -1285,7 +1285,7 @@ STATIC_ASSERT(TestRWTypes<Empty, None, None, None, None>::value);
STATIC_ASSERT(TestRWTypes<int, None, None, None, None>::value);
STATIC_ASSERT(TestRWTypes<int X::*, None, None, None, None>::value);
// Test DevDiv#864867 "<functional> reference_wrapper: reference_wrapper should handle functors that are both unary and
// Test DevDiv-864867 "<functional> reference_wrapper: reference_wrapper should handle functors that are both unary and
// binary [libs-conformance]".
struct SameResults : UnaryFunction<int, bool>, BinaryFunction<short, long, bool> {
@ -1465,7 +1465,7 @@ void test_function() {
// std::functions.
// Test DevDiv#759096 "<functional> function: std::function construction copies its target instead of moving".
// Test DevDiv-759096 "<functional> function: std::function construction copies its target instead of moving".
{
CopyMoveCounter<1> cmc0;
CopyMoveCounter<1> cmc1(cmc0);
@ -1663,7 +1663,7 @@ void test_function() {
}
// Test DevDiv#1010027 "<functional> function: std::function with return type void does not ignore return type on
// Test DevDiv-1010027 "<functional> function: std::function with return type void does not ignore return type on
// assignment".
{
string s("ChooseAMovieTitle");
@ -1712,8 +1712,8 @@ void test_function() {
}
// Test DevDiv#294051 "<functional> function: std::function has lost the ability to invoke PMFs/PMDs on various
// things". Test DevDiv#789899 "<functional> function: std::function does not work for member functions".
// Test DevDiv-294051 "<functional> function: std::function has lost the ability to invoke PMFs/PMDs on various
// things". Test DevDiv-789899 "<functional> function: std::function does not work for member functions".
{
struct Y {
int m_n;
@ -1862,7 +1862,7 @@ void test_function() {
// Test bind(), user-reported bugs.
void test_bind() {
// Test DDB#176058 "TR1: result_of doesn't accept result_type typedefs for references" (title is now bogus).
// Test DDB-176058 "TR1: result_of doesn't accept result_type typedefs for references" (title is now bogus).
{
struct PassThru {
int& operator()(int& obj) const {
@ -1880,9 +1880,9 @@ void test_bind() {
}
// Test DevDiv#343411 "<functional> bind: bind() and std::function don't work with rvalue references".
// Test DevDiv#410033 "<functional>: bind() doesn't work with rvalue reference signatures".
// Test DevDiv#862588 "<functional> bind: std::bind doesn't forward unbound arguments".
// Test DevDiv-343411 "<functional> bind: bind() and std::function don't work with rvalue references".
// Test DevDiv-410033 "<functional>: bind() doesn't work with rvalue reference signatures".
// Test DevDiv-862588 "<functional> bind: std::bind doesn't forward unbound arguments".
{
#ifndef _M_CEE_PURE
@ -1921,8 +1921,8 @@ void test_bind() {
}
// Test DevDiv#487679 "<functional> bind: MSVS 2012 C++ std::bind illegal indirection compiler error".
// Test DevDiv#617421 "<functional> bind: Bind failing to compile with a vector of functions".
// Test DevDiv-487679 "<functional> bind: MSVS 2012 C++ std::bind illegal indirection compiler error".
// Test DevDiv-617421 "<functional> bind: Bind failing to compile with a vector of functions".
{
struct BaseFunctor {
int operator()(int n) const {
@ -1940,7 +1940,7 @@ void test_bind() {
}
// Test DevDiv#505570 "<functional> bind: Can't bind a pointer to a data member using a pointer, smart pointer or
// Test DevDiv-505570 "<functional> bind: Can't bind a pointer to a data member using a pointer, smart pointer or
// iterator to the object".
{
struct Object {
@ -1964,7 +1964,7 @@ void test_bind() {
}
// Test DevDiv#535246 "<functional> bind: Cannot call const forwarding call wrapper result of std::bind".
// Test DevDiv-535246 "<functional> bind: Cannot call const forwarding call wrapper result of std::bind".
{
const auto cb = bind(&quadruple, 11);
@ -2213,7 +2213,7 @@ _CONSTEXPR20 bool test_more_bind() {
}
// Test DevDiv#1160769 "<functional>: bind()'s cv-overloaded function call operators are triggering Expression SFINAE
// Test DevDiv-1160769 "<functional>: bind()'s cv-overloaded function call operators are triggering Expression SFINAE
// problems".
struct Test1160769 {
void method(const int&) {}

Просмотреть файл

@ -12,7 +12,7 @@ int func() {
}
int main() {
{ // DevDiv#482796 "C++11 unexpected behavior for std::future::wait_for and std::packaged_task"
{ // DevDiv-482796 "C++11 unexpected behavior for std::future::wait_for and std::packaged_task"
packaged_task<int()> pt(func);
future<int> f = pt.get_future();
@ -26,7 +26,7 @@ int main() {
assert(f.get() == 1729);
}
{ // DevDiv#696045 "<future>: The function wait_for() wait until timeout."
{ // DevDiv-696045 "<future>: The function wait_for() wait until timeout."
future<int> f = async(launch::deferred, func);
const auto dur = chrono::minutes(5);

Просмотреть файл

@ -20,9 +20,9 @@ void assert_out_of_range(F f) noexcept {
}
}
// DevDiv#96290 "[Product Issue] to_string doesn't work with the param LDBL_MAX"
// DevDiv#730419 "<string>: std::to_string documentation & code disparity"
// DevDiv#835323 "<string>: Bad to_string() result for infinity"
// DevDiv-96290 "[Product Issue] to_string doesn't work with the param LDBL_MAX"
// DevDiv-730419 "<string>: std::to_string documentation & code disparity"
// DevDiv-835323 "<string>: Bad to_string() result for infinity"
int main() {
assert(to_string(numeric_limits<int>::min()) == "-2147483648");
@ -145,7 +145,7 @@ int main() {
assert(to_wstring(numeric_limits<long double>::infinity()) == L"inf");
// Also test DevDiv#875295 "<string>: std::stof returns 1.#INF instead of throwing out_of_range [libcxx]".
// Also test DevDiv-875295 "<string>: std::stof returns 1.#INF instead of throwing out_of_range [libcxx]".
assert_out_of_range([] { stof("1.2e60"); });
@ -166,7 +166,7 @@ int main() {
assert_out_of_range([] { stof(L"-1.5e63"); });
// Also test DevDiv#1113936 "std::stod incorrectly throws exception on some inputs, violating STL specification".
// Also test DevDiv-1113936 "std::stod incorrectly throws exception on some inputs, violating STL specification".
for (const char* const p : {"inf", "Inf", "INF", "infinity", "Infinity", "INFINITY"}) {
assert(isinf(stof(p)));

Просмотреть файл

@ -13,9 +13,9 @@
using namespace std;
// DevDiv#821672 "<locale>: visual studio.net 2013 time libraries buggy (%x %X) - time_get"
// DevDiv#836436 "<iomanip>: get_time()'s AM/PM parsing is broken"
// DevDiv#872926 "<locale>: time_get::get parsing format string gets tm::tm_hour wrong [libcxx]"
// DevDiv-821672 "<locale>: visual studio.net 2013 time libraries buggy (%x %X) - time_get"
// DevDiv-836436 "<iomanip>: get_time()'s AM/PM parsing is broken"
// DevDiv-872926 "<locale>: time_get::get parsing format string gets tm::tm_hour wrong [libcxx]"
tm helper(const char* const s, const char* const fmt) {
tm t{};
@ -117,7 +117,7 @@ int main() {
typedef istreambuf_iterator<char> Iter;
// DevDiv#640278 "<locale>: time_get::do_get_year() thinks the world will end in 2035"
// DevDiv-640278 "<locale>: time_get::do_get_year() thinks the world will end in 2035"
void test_year(const string& str, const ios_base::iostate expected_err, const int expected_tm_year) {
istringstream iss(str);
ios_base::iostate err = ios_base::goodbit;
@ -152,7 +152,7 @@ void test_640278() {
test_year("2013 frozen", ios_base::goodbit, 113);
}
// DevDiv#990695 "<locale>: time_get should ignore ios_base::iostate's initial value"
// DevDiv-990695 "<locale>: time_get should ignore ios_base::iostate's initial value"
void test_990695() {
for (int k = 0; k < 2; ++k) {
const auto Bit = k == 0 ? ios_base::goodbit : ios_base::failbit;

Просмотреть файл

@ -3,7 +3,7 @@
// Derived from: qa/VC/LibsWin/devcrt/tests/C/Dev14_845312_accurate_fp_parsing
// Basic regression test for DevDiv2 #845312: Floating point conversion accuracy
// Basic regression test for DevDiv-845312: Floating point conversion accuracy
// improvements. This test verifies scanf-printf round-tripping of a set of
// diverse floating point values (both single and double precision).

Просмотреть файл

@ -83,11 +83,11 @@ void test_nullptr_compares() {
}
// Also test:
// DevDiv#826403 "<atomic>: passing volatile atomic<T> to store won't compile [libs-conformance]"
// DevDiv#829873 "<atomic>: Error when using atomic pointer to const"
// DevDiv#846428 "<atomic>: std::atomic<T>::store with volatile specifier does not work for non-integral type"
// DevDiv#879700 "<atomic>: atomic<T *> constructor missing cast?"
// DevDiv#1181758 "<atomic>: MSVC 2015 std::atomic is implemented using non-conforming C++"
// DevDiv-826403 "<atomic>: passing volatile atomic<T> to store won't compile [libs-conformance]"
// DevDiv-829873 "<atomic>: Error when using atomic pointer to const"
// DevDiv-846428 "<atomic>: std::atomic<T>::store with volatile specifier does not work for non-integral type"
// DevDiv-879700 "<atomic>: atomic<T *> constructor missing cast?"
// DevDiv-1181758 "<atomic>: MSVC 2015 std::atomic is implemented using non-conforming C++"
// This is compile-only.
template <typename T>

Просмотреть файл

@ -1,7 +1,7 @@
// Copyright (c) Microsoft Corporation.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
// Test DevDiv#920385 "<list>: list::sort shouldn't default-construct allocators".
// Test DevDiv-920385 "<list>: list::sort shouldn't default-construct allocators".
#define _SILENCE_CXX17_OLD_ALLOCATOR_MEMBERS_DEPRECATION_WARNING
@ -284,7 +284,7 @@ int main() {
test_allocator_construct_const();
}
// Also test DevDiv#1119194 "The STL should handle allocators that aren't assignable".
// Also test DevDiv-1119194 "The STL should handle allocators that aren't assignable".
template <typename T>
struct NoProp {
@ -353,7 +353,7 @@ void test_1119194() {
test_swap_copy_move<basic_string<char, char_traits<char>, AC>>();
}
// Test DevDiv#1184701 "<memory>: We should handle construct/destroy returning non-void".
// Test DevDiv-1184701 "<memory>: We should handle construct/destroy returning non-void".
template <typename T>
struct NonVoid {

Просмотреть файл

@ -111,7 +111,7 @@ void run_tests() {
VERIFY(i2 == 5);
}
// Test DevDiv#1086953 "Throwing exception from std::call_once does not allow other threads to enter".
// Test DevDiv-1086953 "Throwing exception from std::call_once does not allow other threads to enter".
// EH, single-threaded.
{
once_flag flag;
@ -149,7 +149,7 @@ void run_tests() {
}
}
// Test DevDiv#1086953 "Throwing exception from std::call_once does not allow other threads to enter".
// Test DevDiv-1086953 "Throwing exception from std::call_once does not allow other threads to enter".
// EH, multi-threaded.
{
long ready = 0;
@ -188,7 +188,7 @@ void run_tests() {
VERIFY(i == 3);
}
// Test DevDiv#1092852 "concurrent std::call_once calls seem to be blocking somewhere on a shared variable".
// Test DevDiv-1092852 "concurrent std::call_once calls seem to be blocking somewhere on a shared variable".
// Also test stateful callable objects.
{
long atom = 0;

Просмотреть файл

@ -1,7 +1,7 @@
// Copyright (c) Microsoft Corporation.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
// Test DevDiv#1114006 "[+ VS2015] conditional_variable with predicate does not behave according to the standard".
// Test DevDiv-1114006 "[+ VS2015] conditional_variable with predicate does not behave according to the standard".
#include <assert.h>
#include <chrono>

Просмотреть файл

@ -1,7 +1,7 @@
// Copyright (c) Microsoft Corporation.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
// DevDiv2 #1131212: std::uncaught_exceptions is not implemented
// DevDiv-1131212: std::uncaught_exceptions is not implemented
//
// This test validates the implementation of std::uncaught_exceptions by recursively
// throwing exceptions from a destructor.

Просмотреть файл

@ -77,7 +77,7 @@ void test_case_is_partitioned_parallel(const size_t testSize) {
// testing with 2 partition points (T F T ... T F T ... T), where the F at index 1 is fixed and the second F is
// tried at each index
first = std::next(c.begin());
first = next(c.begin());
*first = false;
while (++first != c.end()) {
*first = false;
@ -90,7 +90,7 @@ void test_case_is_partitioned_parallel(const size_t testSize) {
// testing with 2 partition adjacent points (T...T F T F...F) where the adjacent partition points are tried at each
// index
first = c.begin();
auto second = std::next(first, 2);
auto second = next(first, 2);
for (; second != c.end(); ++first, ++second) {
*first = true;
*second = true;

Просмотреть файл

@ -38,7 +38,7 @@ vector<string> prepare_alpha_strings(const size_t testSize) {
}
const auto maxAlphaStrings = prepare_alpha_strings(max_parallel_test_case_n);
const auto removeOne = [](std::string str) {
const auto removeOne = [](string str) {
str.pop_back();
return str;
};

Просмотреть файл

@ -38,7 +38,7 @@ vector<string> prepare_alpha_question_strings(const size_t testSize) {
}
const auto maxAlphaStrings = prepare_alpha_question_strings(max_parallel_test_case_n);
const auto removeOne = [](std::string str) {
const auto removeOne = [](string str) {
str.pop_back();
return str;
};

Просмотреть файл

@ -202,13 +202,13 @@ int overloaded(duration<int, exa>) {
}
int main() {
// DevDiv#453376 "std::chrono::duration_cast lacks double support"
// DevDiv-453376 "std::chrono::duration_cast lacks double support"
duration<double> d(17.29);
assert(duration_cast<duration<long long>>(d).count() == 17);
// DevDiv#742944 "non conforming return value for std::chrono::duration::operator%()"
// DevDiv-742944 "non conforming return value for std::chrono::duration::operator%()"
assert((milliseconds(1050) % seconds(1)).count() == 50);
assert((milliseconds(1729) / 10).count() == 172);
@ -217,7 +217,7 @@ int main() {
assert((minutes(4) % milliseconds(1729)).count() == 1398);
// DevDiv#1134356 "[STL]Test failed with std::chrono::milliseconds"
// DevDiv-1134356 "[STL]Test failed with std::chrono::milliseconds"
// LWG-2094 "duration conversion overflow shouldn't participate in overload resolution"
assert(overloaded(40ms) == 11);
assert(overloaded(50s) == 22);

Просмотреть файл

@ -936,16 +936,16 @@ constexpr bool test_case_operators() {
}
void test_case_inserter() {
std::ostringstream oss;
ostringstream oss;
string_view sv("text");
oss << sv;
assert(oss.str() == "text");
}
void test_case_hashing() {
std::string str("hungry EVIL zombies");
std::string_view strView(str);
assert(std::hash<std::string>{}(str) == std::hash<std::string_view>{}(strView));
string str("hungry EVIL zombies");
string_view strView(str);
assert(hash<string>{}(str) == hash<string_view>{}(strView));
}
void test_case_string_integration() {

Просмотреть файл

@ -307,7 +307,7 @@ void test_case_VSO_802346_unordered_set() {
TestType source;
source.construct(size_t{}, stateful_allocator<int>(1234));
const auto oldBuckets = source.get().bucket_count();
assert(oldBuckets == std::unordered_set<int>().bucket_count());
assert(oldBuckets == unordered_set<int>().bucket_count());
TestType target;
target.construct(move(source.get()), stateful_allocator<int>(42));
assert(target.get().bucket_count() == oldBuckets);

Просмотреть файл

@ -19,8 +19,8 @@ int main() {
#endif // _HAS_CXX17
// LWG-1203 "More useful rvalue stream insertion"
assert((std::ostringstream{} << 42).str() == "42");
assert((ostringstream{} << 42).str() == "42");
int x;
assert((std::istringstream("42 1729") >> x).str() == "42 1729");
assert((istringstream("42 1729") >> x).str() == "42 1729");
assert(x == 42);
}

Просмотреть файл

@ -44,7 +44,7 @@ void test_devdiv_165070_regex_should_accept_wchar_t() {
}
void test_devdiv_822474_match_results_should_be_ready_after_regex_search() {
// DevDiv#822474 "<regex>: match_results::ready() returns false after regex_search called [libs-conformance]"
// DevDiv-822474 "<regex>: match_results::ready() returns false after regex_search called [libs-conformance]"
// N3797 28.10.1 [re.results.const]/3:
// match_results(const Allocator& a = Allocator());

Просмотреть файл

@ -107,7 +107,7 @@ void test_dev10_505773_regex_should_accept_empty_alternations() {
}
void test_dev11_821930_literal_dollar_replacement_characters() {
// Also test DevDiv#821930 "<regex>: match_results formatting: _Format_default increment error [libs-conformance]"
// Also test DevDiv-821930 "<regex>: match_results formatting: _Format_default increment error [libs-conformance]"
// N3797 28.5.2 [re.matchflag]:
// Element: format_default

Просмотреть файл

@ -21,8 +21,8 @@ using namespace std;
STATIC_ASSERT(is_same_v<BASE::type, __VA_ARGS__::type>)
// Regression test for:
// DevDiv2 #387795: is_pod<void> should be false
// DevDiv2 #424157: is_assignable/is_trivially_assignable/is_trivially_move_assignable for void
// DevDiv-387795: is_pod<void> should be false
// DevDiv-424157: is_assignable/is_trivially_assignable/is_trivially_move_assignable for void
// N3376 20.9.4.1[meta.unary.cat]: primary type categories:
STATIC_ASSERT(is_void_v<void>);
@ -363,7 +363,7 @@ STATIC_ASSERT(!is_convertible_v<const void, int>);
STATIC_ASSERT(!is_convertible_v<volatile void, int>);
STATIC_ASSERT(!is_convertible_v<const volatile void, int>);
// Verify simplifications after DevDiv#1195735 "C1XX should select IsConst<const T> for IsConst<const int[3]>" was
// Verify simplifications after DevDiv-1195735 "C1XX should select IsConst<const T> for IsConst<const int[3]>" was
// fixed.
STATIC_ASSERT(!is_const_v<int>);
STATIC_ASSERT(!is_const_v<int[3]>);
@ -550,7 +550,7 @@ STATIC_ASSERT(is_base_of_v<bool_constant<false>, negation<final_fake_bool<true>>
// </P0013R1>
// DDB#198043 "[VS2008 / TR1] problems with is_pod and has_trivial_constructor"
// DDB-198043 "[VS2008 / TR1] problems with is_pod and has_trivial_constructor"
struct TrivialExceptConstruct {
TrivialExceptConstruct();
int i;

Просмотреть файл

@ -72,7 +72,7 @@ int main() {
assert(BasicLifetimeTracker::allAlive == 0);
{
std::exception_ptr ptr;
exception_ptr ptr;
try {
throw EvilException<0>(); // copy 1
} catch (...) {

Просмотреть файл

@ -78,7 +78,7 @@ int main() {
vector<int> vec(begin_arr, end_arr);
}
// DevDiv#557214 "std::forward_iterator_tag derives from std::output_iterator_tag"
// DevDiv-557214 "std::forward_iterator_tag derives from std::output_iterator_tag"
STATIC_ASSERT(is_base_of_v<input_iterator_tag, forward_iterator_tag>);
STATIC_ASSERT(is_base_of_v<forward_iterator_tag, bidirectional_iterator_tag>);
STATIC_ASSERT(is_base_of_v<bidirectional_iterator_tag, random_access_iterator_tag>);

Просмотреть файл

@ -19,7 +19,7 @@ using namespace std;
// Also validate deleted stream inserters for char8_t and pointer-to-char8_t, speculatively implemented from P1423R1.
#ifdef __cpp_char8_t
template <class T>
constexpr auto f(int) -> decltype(std::declval<std::ostream&>() << std::declval<T&>(), true) {
constexpr auto f(int) -> decltype(declval<ostream&>() << declval<T&>(), true) {
return true;
}
template <class T>

Просмотреть файл

@ -278,10 +278,10 @@ private:
inc_dec(3);
}
static void do_it2() { // increment/decrement by max() - 5
inc_dec(std::numeric_limits<Ty>::max() - 5);
inc_dec(STD numeric_limits<Ty>::max() - 5);
}
static void do_it3() { // increment/decrement by max() - 7
inc_dec(std::numeric_limits<Ty>::max() - 7);
inc_dec(STD numeric_limits<Ty>::max() - 7);
}
static void inc_dec(Ty value) { // increment/decrement by value
unsigned long limit = iterations;

Просмотреть файл

@ -32,7 +32,7 @@ static void t_bad() { // test bad_function_call
try { // test exception for empty function object
Myfunc fd1;
std::cout << fd1(3) << std::endl;
STD cout << fd1(3) << STD endl;
} catch (const STD bad_function_call&) { // handle bad call
ok = true;
}

Просмотреть файл

@ -55,15 +55,15 @@ static STD error_code rtr(STD future_errc::future_already_retrieved);
static STD error_code sat(STD future_errc::promise_already_satisfied);
static STD error_code nst(STD future_errc::no_state);
static bool check_future_errc(std::future_errc) { // bind to future_errc values
static bool check_future_errc(STD future_errc) { // bind to future_errc values
return 1;
}
static bool check_launch(std::launch) { // bind to launch values
static bool check_launch(STD launch) { // bind to launch values
return 1;
}
static bool check_future_status(std::future_status) { // bind to future_status values
static bool check_future_status(STD future_status) { // bind to future_status values
return 1;
}

Просмотреть файл

@ -288,7 +288,7 @@ static void t_shared_ptr() { // test shared_ptr interface
{ // shared_ptr = shared_ptr(_V*, _D, _A)
deleter::called = 0;
X2* it = new X2;
STD shared_ptr<X2> sp0(it, deleter(), std::allocator<int>());
STD shared_ptr<X2> sp0(it, deleter(), STD allocator<int>());
STD shared_ptr<X0> sp1;
sp1 = sp0;
CHECK_INT(sp0.use_count(), 2);
@ -304,7 +304,7 @@ static void t_shared_ptr() { // test shared_ptr interface
{ // shared_ptr = shared_ptr(const _SP&, _T*)
deleter::called = 0;
X2* it = new X2;
STD shared_ptr<X2> sp0(it, deleter(), std::allocator<int>());
STD shared_ptr<X2> sp0(it, deleter(), STD allocator<int>());
int x = 3;
STD shared_ptr<int> sp1(sp0, &x);
CHECK_INT(sp0.use_count(), 2);
@ -488,7 +488,7 @@ static void t_shared_ptr() { // test shared_ptr interface
X0* it0 = new X0;
X2* it1 = new X2;
STD shared_ptr<X0> sp0(it0);
sp0.reset(it1, deleter(), std::allocator<int>());
sp0.reset(it1, deleter(), STD allocator<int>());
CHECK_INT(sp0.use_count(), 1);
CHECK_PTR(sp0.get(), it1);
CHECK(STD get_deleter<deleter>(sp0) != nullptr);

Просмотреть файл

@ -424,7 +424,7 @@ static void tdiscrete() {
CHECK_DOUBLE(dist0.probabilities()[0], 1.0);
dist0.reset();
std::vector<double> vec(4, 1.0);
STD vector<double> vec(4, 1.0);
dist_t dist1(STD initializer_list<double>(vec.data(), vec.data() + vec.size()));
@ -465,13 +465,13 @@ static void tpiecewise_constant() {
CHECK_DOUBLE(dist0.probabilities()[0], 1.0);
dist0.reset();
std::vector<double> ends;
STD vector<double> ends;
ends.push_back(0.0);
ends.push_back(1.0);
ends.push_back(2.0);
ends.push_back(3.0);
ends.push_back(4.0);
std::vector<double> vec(4, 1.0);
STD vector<double> vec(4, 1.0);
dist_t dist1(ends.begin(), ends.end(), vec.begin());
CHECK_INT(dist1.densities().size(), 4);
CHECK_DOUBLE(dist1.densities()[0], 0.25);
@ -524,13 +524,13 @@ static void tpiecewise_linear() {
CHECK_DOUBLE(dist0.probabilities()[0], 1.0);
dist0.reset();
std::vector<double> ends;
STD vector<double> ends;
ends.push_back(0.0);
ends.push_back(1.0);
ends.push_back(2.0);
ends.push_back(3.0);
ends.push_back(4.0);
std::vector<double> vec(5, 1.0);
STD vector<double> vec(5, 1.0);
dist_t dist1(ends.begin(), ends.end(), vec.begin());
CHECK_INT(dist1.densities().size(), 5);
CHECK_INT(dist1.intervals().size(), 5);