We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 03b292c commit 477aeceCopy full SHA for 477aece
src/utils/utils.hpp
@@ -283,7 +283,10 @@ namespace detail {
283
F f;
284
bool active;
285
public:
286
- template<typename G>
+ template<
287
+ typename G,
288
+ typename std::enable_if<!std::is_same<typename std::decay<G>::type, scope_guard<F>>::value, int>::type = 0
289
+ >
290
scope_guard(G&& f) : f(std::forward<F>(f)), active(true) {}
291
~scope_guard() {
292
if(active) {
0 commit comments