summaryrefslogtreecommitdiff
path: root/lib/stdTypeDefs.hpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2023-04-29 19:07:11 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2023-04-29 19:07:11 +0100
commit5a0b3927a33807cca4c77c40eb873f8a3b51b0b0 (patch)
tree4af0585ee8f8f468ab10c0a4fe9994fb30b79599 /lib/stdTypeDefs.hpp
parentDunno how, but some DOS new lines got in here! (diff)
downloadilt-5a0b3927a33807cca4c77c40eb873f8a3b51b0b0.tar.bz2
ilt-5a0b3927a33807cca4c77c40eb873f8a3b51b0b0.tar.xz
ilt-5a0b3927a33807cca4c77c40eb873f8a3b51b0b0.zip
Drop .hpp for header only things
Half of them acquired a .cpp part anyway
Diffstat (limited to 'lib/stdTypeDefs.hpp')
-rw-r--r--lib/stdTypeDefs.hpp45
1 files changed, 0 insertions, 45 deletions
diff --git a/lib/stdTypeDefs.hpp b/lib/stdTypeDefs.hpp
deleted file mode 100644
index 317cdb3..0000000
--- a/lib/stdTypeDefs.hpp
+++ /dev/null
@@ -1,45 +0,0 @@
-#pragma once
-
-#include <memory>
-#include <vector>
-
-template<typename T> struct AnyPtr {
- // cppcheck-suppress noExplicitConstructor
- AnyPtr(T * p) : ptr {p} { }
- // cppcheck-suppress noExplicitConstructor
- template<typename S> AnyPtr(const S & p) : ptr {p.get()} { }
- auto
- get() const
- {
- return ptr;
- }
- auto
- operator->() const
- {
- return ptr;
- }
- auto &
- operator*() const
- {
- return *ptr;
- }
-
-private:
- T * ptr;
-};
-
-template<typename T> struct StdTypeDefs {
- using AnyPtr = ::AnyPtr<T>;
- using AnyCPtr = ::AnyPtr<const T>;
- using Ptr = std::shared_ptr<T>;
- using CPtr = std::shared_ptr<const T>;
- using WPtr = std::weak_ptr<const T>;
- using Collection = std::vector<Ptr>;
- using CCollection = std::vector<CPtr>;
- using WCollection = std::vector<WPtr>;
-};
-
-template<typename T> struct ConstTypeDefs {
- using Ptr = std::shared_ptr<const T>;
- using Collection = std::vector<Ptr>;
-};