Browse Source

Using a type alias.

main
offa 7 years ago
parent
commit
7f2b506318
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      test/UniqueResourceTest.cpp

+ 3
- 1
test/UniqueResourceTest.cpp View File

@@ -21,10 +21,12 @@
#include "unique_resource.h"
#include <catch.hpp>

using Handle = int;

TEST_CASE("deleter called on destruction", "[UniqueResource]")
{
std::size_t calls{0};
constexpr int handle{3};
constexpr Handle handle{3};

{
auto guard = sr::unique_resource(handle, [&calls] { ++calls; });

Loading…
Cancel
Save