1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
5 * You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #include "mozilla/Assertions.h"
8 #include "mozilla/ScopeExit.h"
10 using mozilla::MakeScopeExit
;
15 MOZ_RELEASE_ASSERT(cond, "Failed assertion: " #c); \
28 auto guardA
= MakeScopeExit([&] { a
--; });
31 auto guardB
= MakeScopeExit([&] { b
--; });
36 auto guardC
= MakeScopeExit([&] { c
--; });
38 { auto guardC_
= std::move(guardC
); }