aboutsummaryrefslogtreecommitdiffstats
path: root/nihil.guard
diff options
context:
space:
mode:
Diffstat (limited to 'nihil.guard')
-rw-r--r--nihil.guard/CMakeLists.txt1
-rw-r--r--nihil.guard/guard.ccm9
-rw-r--r--nihil.guard/test.cc6
3 files changed, 4 insertions, 12 deletions
diff --git a/nihil.guard/CMakeLists.txt b/nihil.guard/CMakeLists.txt
index 436728a..a5e0fc2 100644
--- a/nihil.guard/CMakeLists.txt
+++ b/nihil.guard/CMakeLists.txt
@@ -1,6 +1,7 @@
# This source code is released into the public domain.
add_library(nihil.guard STATIC)
+target_link_libraries(nihil.guard PRIVATE nihil.std)
target_sources(nihil.guard
PUBLIC FILE_SET modules TYPE CXX_MODULES FILES
guard.ccm
diff --git a/nihil.guard/guard.ccm b/nihil.guard/guard.ccm
index 84ff401..fdda45c 100644
--- a/nihil.guard/guard.ccm
+++ b/nihil.guard/guard.ccm
@@ -1,13 +1,8 @@
// This source code is released into the public domain.
-module;
-
-#include <concepts>
-#include <functional>
-#include <optional>
-#include <utility>
-
export module nihil.guard;
+import nihil.std;
+
namespace nihil {
// guard: invoke a callable when this object is destroyed; this is similar to
diff --git a/nihil.guard/test.cc b/nihil.guard/test.cc
index 11f7d37..f1b3f21 100644
--- a/nihil.guard/test.cc
+++ b/nihil.guard/test.cc
@@ -1,13 +1,9 @@
-/*
- * This source code is released into the public domain.
- */
+// This source code is released into the public domain.
#include <catch2/catch_test_macros.hpp>
import nihil.guard;
-using namespace std::literals;
-
TEST_CASE("guard: basic", "[guard]") {
int n = 0;