Skip to content

Missing explicit instantiation for format_float<double> and <long double> #413

Closed
@Smjert

Description

@Smjert

I've compiled fmt(7ce7def) as a shared library with Clang 3.9.0, when i include the fmt/format.h header in my project clang warns about format_float for double and long double not being explicitly instantiated.

Now my guess is that since it is explicitly instantiated in the format.cc, but where i'm using the function is not the same TU, it needs to be either explicitly instantiated again (by me) or even better format.h should contain an extern template declaration (i did that and the warning went away), because the template is effectively instantiated "somewhere else".

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