x86 용 DMD 2.062를 사용하고 있습니다.Object.Error : std.algorithm.cartesianProduct의 결과를 인쇄 할 때 액세스 위반이 발생했습니다.
module test;
private enum test1
{
one,
two,
three,
}
private enum test2
{
one,
two,
three,
}
auto ct = cartesianProduct([EnumMembers!test1], [EnumMembers!test2]);
unittest
{
import std.stdio;
foreach (n, m; ct)
{
writeln(n, " ", m);
}
}
이 프로그램은 인쇄합니다 :
one one
two one
three one
그런 다음 액세스 위반 오류가 발생합니다. cartesianProduct를 잘못 사용하고 있습니까? 아니면이 함수의 버그입니까?
http://d.puremagic.com/issues/show_bug.cgi?id=9822를 제출하면 개발자의 의견을 볼 수 있습니다. –
@AlexanderMalakhov 감사합니다. –