Skip to content

[meta] Clarify what happens when std::meta::members_of is unable to form a std::vector #8738

@eisenwave

Description

@eisenwave

It is plausible that the global namespace is gunked up with several thousand declarations after including various C headers, to a point where std::meta::members_of(^^::) would be unable to form a std::vector that holds the reflections. For example, when targeting a 16-bit architecture, the max_size() of a std::vector may be relatively low, such as ~32K, but the compiler (especially when cross-compiling) could be capable of storing that many declarations internally.

A note may be helpful guidance to implementations in this case. Notably, it would be valid to refuse translation due to implementation limits being exceeded, but it wouldn't be valid to throw std::bad_alloc and let the user handle it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3-OtherTriaged issue not in P1 or P2

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions