Bug 20794 – attempting to instantiate core.stdcpp.vector.vector gives wrong error message

Status
NEW
Severity
minor
Priority
P3
Component
druntime
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2020-05-02T18:24:32Z
Last change time
2024-12-07T13:40:10Z
Assigned to
No Owner
Creator
Gregor Mückl
Moved to GitHub: dmd#17401 →

Comments

Comment #0 by gregormueckl — 2020-05-02T18:24:32Z
The following programm cannot be compiled using dmd 2.091.0 on Linux: --- import core.stdcpp.vector; void main() { vector!int cppVector; } --- Attempting to compile it results in > rdmd vectortest.d /usr/include/dlang/dmd/core/stdcpp/vector.d(57): Error: undefined identifier size, did you mean alias size_t? vectortest.d(5): Error: template instance core.stdcpp.vector.vector!(int, allocator!int) error instantiating Failed: ["/usr/bin/dmd", "-v", "-o-", "vectortest.d", "-I."] The static assert in line 740 of vector.d is likely intended to fail to give an informative error message: --- else { static assert(false, "C++ runtime not supported"); } --- However, the compiler fails earlier than that, resulting in the cryptic message quoted above.
Comment #1 by robert.schadek — 2024-12-07T13:40:10Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/17401 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB