瀏覽代碼

Using a type alias.

main
offa 7 年之前
父節點
當前提交
7f2b506318
共有 1 個檔案被更改,包括 3 行新增1 行删除
  1. +3
    -1
      test/UniqueResourceTest.cpp

+ 3
- 1
test/UniqueResourceTest.cpp 查看文件

@@ -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…
取消
儲存