Describe the bug
valarray does not trigger run-time debug assertion.
Command-line test case
D:\Temp2>type repro.cpp
#include <iostream>
#include <valarray>
int main() {
std::valarray<int> v(1, 1);
std::cout << v[1] << '\n';
}
D:\Temp2>cl /D "_DEBUG" /MDd /EHsc /W4 /WX .\repro.cpp
Microsoft (R) C/C++ Optimizing Compiler Version 19.27.29009.1 for x86
Copyright (C) Microsoft Corporation. All rights reserved.
repro.cpp
Microsoft (R) Incremental Linker Version 14.27.29009.1
Copyright (C) Microsoft Corporation. All rights reserved.
/out:repro.exe
repro.obj
D:\Temp2>.\repro
-33686019
Expected behavior
Assertion failure
STL version
Microsoft Visual Studio Professional 2019 Preview
Version 16.7.0 Preview 3.1
Additional context
This item is also tracked on Developer Community as DevCom-364060 and by Microsoft-internal VSO-715060 / AB#715060.