diff options
| author | Lexi Winter <lexi@le-fay.org> | 2025-07-01 17:07:04 +0100 |
|---|---|---|
| committer | Lexi Winter <lexi@le-fay.org> | 2025-07-01 17:07:04 +0100 |
| commit | 2e2d1bd3b6c7776b77c33b94f30ead89367a71e6 (patch) | |
| tree | 54d37ffadf8e677938d9b7a28e4e9b71be1e75c1 /nihil.guard | |
| parent | 36427c0966faa7aecd586b397ed9b845f18172f5 (diff) | |
| download | nihil-2e2d1bd3b6c7776b77c33b94f30ead89367a71e6.tar.gz nihil-2e2d1bd3b6c7776b77c33b94f30ead89367a71e6.tar.bz2 | |
add nihil.std
Diffstat (limited to 'nihil.guard')
| -rw-r--r-- | nihil.guard/CMakeLists.txt | 1 | ||||
| -rw-r--r-- | nihil.guard/guard.ccm | 9 | ||||
| -rw-r--r-- | nihil.guard/test.cc | 6 |
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; |
