Skip to content

Compiled headers fail on -Wundefined-func-template if we use Vec #1671

@jmcclellan-figma

Description

@jmcclellan-figma

Right now Vec for specific types is implemented with template specializations here, however this scheme doesn't work with -Wundefined-func-template warning enabled in Clang, since e.g. the Vec<MyType>::drop function is left undeclared in the header.

While clang does seem to compile this correctly, it's not actually allowed by C++ - see cppreference, specifically:

Specialization must be declared before the first use that would cause implicit instantiation, in every translation unit where such use occurs

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