Skip to content

Stack overflow with static foreach #205

@rainers

Description

@rainers

This code (reduced from std.math) causes a stack overflow when trying to get a tooltip for Num.alignof:

import std.meta : AliasSeq;
deprecated("Please use std.complex")
static foreach (Num; AliasSeq!(cfloat, cdouble, creal, ifloat, idouble, ireal))
{
    auto abs(Num z) @safe pure nothrow @nogc
    {
	enum m = Num.alignof;
	return m;
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions