Skip to content

compat_ headers are an ODR nightmare #443

Open
@danakj

Description

@danakj

Collapse these headers or include them from the concept-defining location?

But we don't want to include every container header from the from_iterator.h header. However it's real bad if some places see FromIteratorstd::vector to be true and others see it to be false. The compiler can cache the answer and get false everywhere unexpectedly.

The right thing to do is to ensure the concept knows the right answer where the concept is defined, or where the std::vector (etc) type is defined. We can't do the latter so... how do we do the former?

Or, once sus::Vec is backed by std::vector do we just say you'd it.collect<sus::Vec<T>>() and then you can convert for ~free to std::vector? That feels bad though. It would be better to it.collect<std::vector<T>>().

Notably we avoided this issue for option/result and numerics, so this does not block the numerics milestone.

Metadata

Metadata

Assignees

No one assigned

    Labels

    designDesign of the library systems as a whole, such as concepts

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions