Consequences of optional <T> C ++ standard input
The design std::optional<T>has recently (?) Been accepted into the C ++ 17 language standard. Now there are quite a few places in the existing APIs where they std::optional<T>are candidates for replacing the return type of functions; in fact, these are functions that are an attempt to get / produce something that is not guaranteed:
- Search for an item in a container.
- Access to the value in the map by its key.
- Memory allocation
- Establishing input / output stream from a file or through a network.
So my question is: is a standard committee considering (or even adopting it) changes / additions to established APIs that involve use std::optional? If this is what part of the standard (in your opinion) can change? And are such changes expected for C ++ 17 or later?
+4