page = arthur o'dwyer – stuff mostly about c++
url = https://quuxplusone.github.io/blog
Here’s a puzzle for you: How do you write a class without a copy constructor?
Many thanks to Matheus Izvekov for the implementation, and to Stephan Bergmann for reporting these issues!
template<class C> struct Wrap { Wrap(C&); operator C::iterator() const; }; template<class C> void f(C&, typename C::const_iterator); int main() { std::list<int> v; f(v, Wrap(v)); }