For a long time I had never been concerned about having to write using std::swap; before calling swap() - I knew why I had to do it and even though I knew it was a nuance, I didn't care too much because it was trivial extra typing.
From what I understand, if the article's proposed changes are implemented into C++, then that commit wouldn't even have to exist.
ADL is a really powerful feature of C++ and I feel like it is held back by nuances like this. Do you think it's important that this issue be tackled as soon as C++17? Or do you think it can be set on the back burners for a while?
Personally, with the direction C++ is going, I think we will only need it to be fixed more and more, so for me, sooner is better.
Bjarne is fighting the hard fight at making f(x, y) and x.f(y) do the same thing in C++17 (or the closest thing possible to being the same), similar to how member and non-member operators are treated.. Microsoft is pushing for something similar, but giving precedence to x.f(y) (so that intellisense can work).. so things might change quite a bit,
I've actually been thinking that myself, and was planning on making it a feature in my own language. It makes a lot of since and I would be very happy to see it come to C++.
I just realized, if std::swap becomes an object with a templated operator()(), then code that explicitly uses template parameters will break. But, is this even an issue? Why would you ever write code such as std::swap<..., ...>(..., ...) in the first place?
my knowledge of UFI's stem from nim (http://nim-lang.org ), which doesnt have a this or a self, which is what allows them to work. how would UFI's work in c++ with a *this?
uniform function interface. its the name for x.foo(y) == foo(x, y); i was referring to:
cubbi wrote:
Bjarne is fighting the hard fight at making f(x, y) and x.f(y) do the same thing in C++17 (or the closest thing possible to being the same), similar to how member and non-member operators are treated.. Microsoft is pushing for something similar, but giving precedence to x.f(y) (so that intellisense can work).. so things might change quite a bit,