On Mon, 29 Sept 2025 at 15:27, Luc Grosheintz <[email protected]> wrote: > > Dear libstdc++ devs, > > While implementing submdspan, I ran into difficulty related to > user-defined "integers", i.e. any class that converts to `index_type` > (the latter is always a signed or unsigned integer). > > The user-defined types might not be copyable or only convert to > `index_type` from an rvalue.
Perhaps they should be required to be copyable and convertible from lvalues, and if the spec doesn't allow such a requirement, the spec should be fixed. I find it hard-fetched to have such wrinkles in types that are, for all purposes, supposed to emulate built-in types as far as possible, like custom number types are supposed to.
