Skip to content

typeid(T).hash_code在某些编译器、不同类型或不同版本编译器上有潜在风险 #2

@KondeU

Description

@KondeU

typeid(T).hash_code在Android的部分编译器上同一个类型在不同的so中的hash_code会不同,会导致GlobalSingleton无法工作;

若最终的dll/so集合混用了不同类型、不同版本的编译器,可能会有hash_code不一致的潜在风险。

"Obtain", typeid(T).hash_code(), sizeof(T));

"Release", typeid(T).hash_code());

"Count", typeid(T).hash_code()) > 0);

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is neededwontfixThis will not be worked on

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions