aboutsummaryrefslogtreecommitdiff
path: root/src/common/Utilities/advstd.h
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2020-08-20 13:34:45 +0200
committerShauren <shauren.trinity@gmail.com>2020-08-20 13:34:45 +0200
commit7c08fc863ac45f2d41b18103b0132004a4c0c524 (patch)
tree8e32f3f3088cfb44f1f631cb3ddbf0ad5ecd72ff /src/common/Utilities/advstd.h
parent7bfeb03c136f18fda73474054c837f4fe8f11136 (diff)
Core/Util: Added new utilities
* Trinity::new_from_tuple - same as std::make_from_tuple except allocates object using "new" * Trinity::is_tuple - detects whether given type is a tuple specialization * advstd::type_identity - C++20 std::type_identity
Diffstat (limited to 'src/common/Utilities/advstd.h')
-rw-r--r--src/common/Utilities/advstd.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/common/Utilities/advstd.h b/src/common/Utilities/advstd.h
index fc8221b7314..2552f7d12bb 100644
--- a/src/common/Utilities/advstd.h
+++ b/src/common/Utilities/advstd.h
@@ -27,6 +27,17 @@ namespace advstd
// C++20 advstd::remove_cvref_t
template <class T>
using remove_cvref_t = std::remove_cv_t<std::remove_reference_t<T>>;
+
+ // C++20 std::type_identity
+ template <typename T>
+ struct type_identity
+ {
+ using type = T;
+ };
+
+ // C++20 std::type_identity_t
+ template <typename T>
+ using type_identity_t = typename type_identity<T>::type;
}
#endif