From af7c89564c01d7170df9fa465dded6867d5c2d2f Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Tue, 9 Apr 2024 22:40:20 -0500 Subject: [PATCH] [ox/std] Add ox::ignore --- deps/ox/src/ox/std/CMakeLists.txt | 1 + deps/ox/src/ox/std/ignore.hpp | 13 +++++++++++++ deps/ox/src/ox/std/std.hpp | 1 + 3 files changed, 15 insertions(+) create mode 100644 deps/ox/src/ox/std/ignore.hpp diff --git a/deps/ox/src/ox/std/CMakeLists.txt b/deps/ox/src/ox/std/CMakeLists.txt index 07b965bc..f6ba8673 100644 --- a/deps/ox/src/ox/std/CMakeLists.txt +++ b/deps/ox/src/ox/std/CMakeLists.txt @@ -103,6 +103,7 @@ install( hardware.hpp hashmap.hpp heapmgr.hpp + ignore.hpp iterator.hpp math.hpp memops.hpp diff --git a/deps/ox/src/ox/std/ignore.hpp b/deps/ox/src/ox/std/ignore.hpp new file mode 100644 index 00000000..771cb7e4 --- /dev/null +++ b/deps/ox/src/ox/std/ignore.hpp @@ -0,0 +1,13 @@ +/* + * Copyright 2016 - 2024 Gary Talent (gary@drinkingtea.net). All rights reserved. + */ + +#pragma once + +namespace ox { + +inline constexpr struct { + constexpr void operator=(auto&&) const noexcept {} +} ignore; + +} \ No newline at end of file diff --git a/deps/ox/src/ox/std/std.hpp b/deps/ox/src/ox/std/std.hpp index 70b110ea..c77eacce 100644 --- a/deps/ox/src/ox/std/std.hpp +++ b/deps/ox/src/ox/std/std.hpp @@ -25,6 +25,7 @@ #include "hardware.hpp" #include "hashmap.hpp" #include "heapmgr.hpp" +#include "ignore.hpp" #include "iterator.hpp" #include "math.hpp" #include "memops.hpp"