scopeguard Questions
14
Solved
I'm attempting to write a simple ScopeGuard based on Alexandrescu concepts but with c++11 idioms.
namespace RAII
{
template< typename Lambda >
class ScopeGuard
{
mutable bool committed;...
Titanesque asked 22/4, 2012 at 17:35
8
Solved
I came across this article written by Andrei Alexandrescu and Petru Marginean many years ago, which presents and discusses a utility class called ScopeGuard for writing exception-safe code. I'd lik...
Paronym asked 7/9, 2008 at 18:20
2
Solved
Running a lambda on scope exit seems like such a basic thing, I would expect it to be standardized. Things like unique_ptr are better, when they apply, but I find there is an endless supply of "one...
Ribbing asked 22/5, 2015 at 20:20
1
Every looked at scope guard so far has a guard boolean variable. For example, see this discussion:
The simplest and neatest c++11 ScopeGuard
But a simple guard works (gcc 4.9, clang 3.6.0):
templ...
Abbreviated asked 10/8, 2015 at 14:49
2
Solved
Is it the caller or the callee copying or moving the return value of a function? For example, if I want to implement the pop() function of a queue, like this
template <typename T>
class que...
Container asked 2/7, 2013 at 8:53
1
Solved
Many people are no doubt familiar with Mr. Alexandrescus ScopeGuard template (now part of Loki) and the new version ScopeGuard11 presented here:
http://channel9.msdn.com/Shows/Going+Deep/C-an...
Specific asked 17/2, 2013 at 23:23
2
Solved
I've written a RAII wrapper for C function pairs which initialize and release resources and it serves me well for most cases.
#include <GL/glfw.h>
#include <string>
#include <functi...
Ruth asked 19/1, 2013 at 21:16
1
© 2022 - 2024 — McMap. All rights reserved.