Skip to content

When __FILE__ is template parameter, force inlining. #1703

@JohanEngelen

Description

@JohanEngelen

A function with __FILE__ as default template parameter must explicitly be marked with pragma(inline, true) otherwise linking problems may occur:

void foo(string file = __FILE__)(){ ...}

See the forum discussion:
https://forum.dlang.org/post/induraqegvpyomvzxwmf@forum.dlang.org

This issue is to track progress, and as an easy referral.

A possible solution is to "infer" pragma(inline, true) when __FILE__ is used as default parameter.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions