Skip to content

flat_map and flat_set should noisily reject vector<bool> #5037

@CaseyCarter

Description

@CaseyCarter

flat_map (and flat_set) cannot adapt vector<bool> since it doesn't meet the sequence container requirements. We should reject vector<bool> at instantiation time with a clear error message citing [flat.map.overview]/7 (respectively [flat.set.overview]/7).

The visualizer for flat_map (currently on the feature/flat_map feature branch) has special cases that activate when both adapted containers are vector or deque. The vector visualization assumes the primary vector template and will therefore fail for flat_map<vector<bool>, meow> (I can't imagine anyone ever using this) and flat_map<meow, vector<bool>> (which should probably be a flat_set<meow>?). These are nowhere close to being important enough use cases to block merging the visualizer, but we should try to handle them properly for completeness.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementSomething can be improvedfixedSomething works now, yay!flat_meowC++23 container adaptors

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions