-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Labels
bugSomething isn't workingSomething isn't workingfixedSomething works now, yay!Something works now, yay!formatC++20/23 formatC++20/23 format
Description
Found by std/utilities/format/format.functions/vformat.pass.cpp in the upcoming libcxx update. I'm working on a fix.
C:\Temp>type meow.cpp
#include <cassert>
#include <format>
#include <string>
using namespace std;
int main() {
const string actual = format("{:a<10}", "");
assert(actual == "aaaaaaaaaa");
}C:\Temp>cl /EHsc /nologo /W4 /std:c++20 /MTd /Od meow.cpp && meow
meow.cpp
C:\Temp>cl /EHsc /nologo /W4 /std:c++20 /MTd /Od /D_ENABLE_STL_INTERNAL_CHECK meow.cpp && meow
meow.cpp
---------------------------
Microsoft Visual C++ Runtime Library
---------------------------
Debug Assertion Failed!
Program: C:\Temp\meow.exe
File: C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Tools\MSVC\14.39.33218\include\format
Line: 244
Expression: STL internal check: _First < _Last
For information on how your program can cause an assertion
failure, see the Visual C++ documentation on asserts.
(Press Retry to debug the application)
---------------------------
Abort Retry Ignore
---------------------------
frederick-vs-ja
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingfixedSomething works now, yay!Something works now, yay!formatC++20/23 formatC++20/23 format