Bug 16331 – std.container.array constructor shouldn't check result of emplacement
Status
RESOLVED
Resolution
FIXED
Severity
minor
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2016-07-28T15:19:00Z
Last change time
2016-10-01T11:46:17Z
Assigned to
nobody
Creator
greensunny12
Comments
Comment #0 by greensunny12 — 2016-07-28T15:19:02Z
Comparing the object after emplacement might fail if they aren't equal, a short example:
void main()
{
double[] values = [double.nan, double.nan];
import std.container.array : Array;
auto arr = Array!double(values); // core.exception.AssertError@std/container/array.d(381): Assertion failure
}
Comment #1 by github-bugzilla — 2016-07-28T17:02:58Z