How to RAIIfy this common pattern?

Pages: 12
Apr 17, 2018 at 12:46am
I played with my post above a bit more and was able to write a C++14 version, but my MSVC still complains about "auto" appearing in a template parameter. Still, neither GCC nor Clang have any issue. I'll admit that I didn't really understand why MSVC is complaining, but perhaps someone could make headway with the version here, which is maybe closer to working: http://rextester.com/FTWIG95683 .

Last edited on Apr 17, 2018 at 2:06am
Apr 19, 2018 at 9:27pm
helios,
When you don't understand something, you can ask.

As for me, I never told I didn't understand the idea nor your question. I just say that maybe you have requirement or limitations you don't tell us about.

Keep cool man. If you don't need help, just don't ask.
Apr 19, 2018 at 10:59pm
You clearly didn't understand the question though, since your proposed solution is entirely inappropriate to the problem.
Apr 20, 2018 at 12:43am
@helios, you're not wrong, but the way you replied on page 1 could be interpreted as being deliberately harsh. I understand if you don't have patience for people that try a solution without understanding the problem--I'm not here to judge that--but expect to get more "comeback" justification responses like punksheep's or tpb's the next time.
Topic archived. No new replies allowed.
Pages: 12