From 6635cee143eb4cf3882bac519b8c12b83b62de62 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Wed, 1 Apr 2026 14:21:10 +0100 Subject: Add helper to Decompose a member pointer --- test/Jamfile.jam | 1 + test/test-static-util.cpp | 29 +++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 test/test-static-util.cpp (limited to 'test') diff --git a/test/Jamfile.jam b/test/Jamfile.jam index da2a61a..baf0db4 100644 --- a/test/Jamfile.jam +++ b/test/Jamfile.jam @@ -79,5 +79,6 @@ run test-environment.cpp : : : test ; run test-ui.cpp : : : test ; compile test-static-enumDetails.cpp ; compile test-static-stream_support.cpp ; +compile test-static-util.cpp ; alias perf : perf-assetFactory perf-persistence perf-geoData perf-instancing perf-terrain ; explicit perf ; diff --git a/test/test-static-util.cpp b/test/test-static-util.cpp new file mode 100644 index 0000000..2a8aa81 --- /dev/null +++ b/test/test-static-util.cpp @@ -0,0 +1,29 @@ +#include "util.h" + +namespace { + struct Base1 { + int a; + float b; + }; + + struct Base2 { + int x; + float y; + }; + + struct Sub : Base1, Base2 { + double value; + }; + + static_assert(std::is_same_v, int>); + static_assert(std::is_same_v, float>); + static_assert(std::is_same_v, int>); + static_assert(std::is_same_v, float>); + static_assert(std::is_same_v, double>); + + static_assert(std::is_same_v, Base1>); + static_assert(std::is_same_v, Base2>); + static_assert(std::is_same_v, Base1>); + static_assert(std::is_same_v, Base2>); + static_assert(std::is_same_v, Sub>); +} -- cgit v1.3