5 ms·
What the ISO C++ committee added to C++17 working draft at Oulu 2016 meeting
- vmorgulis 10y agoMy favorite is "template<auto>". An universal smart pointer: template <typename T,auto f> struct smart { T* pointer=nullptr; ~smart(){f(pointer);} }; smart<char,free> buffer={malloc(...)}; smart<FILE*,fclose> file={fopen(...)}; ... Something to keep in the "potential subset". http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0127r1.html http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p012...