summaryrefslogtreecommitdiff
path: root/asl/tests/meta_tests.cpp
diff options
context:
space:
mode:
authorSteven Le Rouzic <steven.lerouzic@gmail.com>2024-11-02 19:54:50 +0100
committerSteven Le Rouzic <steven.lerouzic@gmail.com>2024-12-20 15:35:58 +0100
commitc09323804c6c6d42c052b1c60061134261e515fc (patch)
tree1c5dd6962e82ee35bc1ae662e6f268826511ada9 /asl/tests/meta_tests.cpp
parentbe34f768e093cb6752ab81fde3ab529861a8a6a8 (diff)
Add function with invoke and result_of_t
Diffstat (limited to 'asl/tests/meta_tests.cpp')
-rw-r--r--asl/tests/meta_tests.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/asl/tests/meta_tests.cpp b/asl/tests/meta_tests.cpp
index 4397763..0f5aa63 100644
--- a/asl/tests/meta_tests.cpp
+++ b/asl/tests/meta_tests.cpp
@@ -1,5 +1,6 @@
#include "asl/meta.hpp"
#include "asl/tests/test_types.hpp"
+#include "asl/testing/testing.hpp"
struct Struct {};
union Union {};
@@ -180,3 +181,12 @@ static_assert(!asl::convertible<Base*, Derived*>);
static_assert(asl::convertible<D, C>);
static_assert(!asl::convertible<Derived*, C*>);
static_assert(asl::convertible<Base, E>);
+
+static_assert(asl::derived_from<Derived, Base>);
+static_assert(!asl::derived_from<Base, Derived>);
+static_assert(!asl::derived_from<D, C>);
+static_assert(!asl::derived_from<C, D>);
+static_assert(!asl::derived_from<uint8_t, uint16_t>);
+static_assert(!asl::derived_from<uint16_t, uint8_t>);
+static_assert(!asl::derived_from<int, int>);
+