Browse Source

Namespace renamed to 'sg'.

main
offa 7 years ago
parent
commit
d6649fd3b1
2 changed files with 2 additions and 4 deletions
  1. +1
    -1
      include/scope_guard.h
  2. +1
    -3
      test/ScopeGuardTest.cpp

+ 1
- 1
include/scope_guard.h View File



#include <utility> #include <utility>


namespace guards
namespace sg
{ {


template<class Deleter> template<class Deleter>

+ 1
- 3
test/ScopeGuardTest.cpp View File

#include "scope_guard.h" #include "scope_guard.h"
#include <catch.hpp> #include <catch.hpp>


using namespace guards;

TEST_CASE("deleter called on destruction", "[ScopeGuard]") TEST_CASE("deleter called on destruction", "[ScopeGuard]")
{ {
bool executed = false; bool executed = false;


{ {
auto guard = scope_guard([&executed] { executed = true; });
auto guard = sg::scope_guard([&executed] { executed = true; });
static_cast<void>(guard); static_cast<void>(guard);
} }



Loading…
Cancel
Save