29 Nov
2020
29 Nov
'20
6:04 p.m.
Jeff Garland wrote:
And to be clear -- I was just illustrating an example that I don't consider to be a 'nice to have' for a newer version of c++. There are certainly others....
There are certainly others, and in every case I think that the right thing to do is along the same lines. This is sometimes relatively trivial, as with string_view, sometimes hard, as with taking error_code& or returning an optional. Note how we don't have this issue at all with boost::function - that's because it already takes everything, including std::function, so interop mostly just works. A library that takes a boost::function in its interface is usable as-is from C++17 client code.