aboutsummaryrefslogtreecommitdiff
path: root/src/common/Utilities
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2023-01-07 22:38:21 +0100
committerShauren <shauren.trinity@gmail.com>2023-01-07 22:38:21 +0100
commit7830e5a7a1b93b0cd083baa3b70a0cfeb475f5f5 (patch)
tree7598c8f933701868ff6d8642607220c0d9cfa133 /src/common/Utilities
parentec424dff3b000d281d14460d4d446f978736c123 (diff)
Core/Misc: Migrate our c++20 advstd to standard features
Diffstat (limited to 'src/common/Utilities')
-rw-r--r--src/common/Utilities/EventProcessor.h3
-rw-r--r--src/common/Utilities/Types.h4
-rw-r--r--src/common/Utilities/advstd.h17
3 files changed, 3 insertions, 21 deletions
diff --git a/src/common/Utilities/EventProcessor.h b/src/common/Utilities/EventProcessor.h
index 3a5cea0bd94..7f662e473ca 100644
--- a/src/common/Utilities/EventProcessor.h
+++ b/src/common/Utilities/EventProcessor.h
@@ -18,7 +18,6 @@
#ifndef __EVENTPROCESSOR_H
#define __EVENTPROCESSOR_H
-#include "advstd.h"
#include "Define.h"
#include "Duration.h"
#include "Random.h"
@@ -89,7 +88,7 @@ private:
};
template<typename T>
-using is_lambda_event = std::enable_if_t<!std::is_base_of_v<BasicEvent, std::remove_pointer_t<advstd::remove_cvref_t<T>>>>;
+using is_lambda_event = std::enable_if_t<!std::is_base_of_v<BasicEvent, std::remove_pointer_t<std::remove_cvref_t<T>>>>;
class TC_COMMON_API EventProcessor
{
diff --git a/src/common/Utilities/Types.h b/src/common/Utilities/Types.h
index 223a09c4ee3..922be079de0 100644
--- a/src/common/Utilities/Types.h
+++ b/src/common/Utilities/Types.h
@@ -18,7 +18,7 @@
#ifndef Types_h__
#define Types_h__
-#include "advstd.h"
+#include <type_traits>
namespace Trinity
{
@@ -35,7 +35,7 @@ namespace Trinity
};
template<template<typename...> typename Check, typename T1, typename... Ts>
- struct find_type_if<Check, T1, Ts...> : std::conditional_t<Check<T1>::value, advstd::type_identity<T1>, find_type_if<Check, Ts...>>
+ struct find_type_if<Check, T1, Ts...> : std::conditional_t<Check<T1>::value, std::type_identity<T1>, find_type_if<Check, Ts...>>
{
};
diff --git a/src/common/Utilities/advstd.h b/src/common/Utilities/advstd.h
index c7727be472b..ff2717c9755 100644
--- a/src/common/Utilities/advstd.h
+++ b/src/common/Utilities/advstd.h
@@ -18,26 +18,9 @@
#ifndef TRINITY_ADVSTD_H
#define TRINITY_ADVSTD_H
-#include <cstddef>
-#include <type_traits>
-
// this namespace holds implementations of upcoming stdlib features that our c++ version doesn't have yet
namespace advstd
{
- // C++20 std::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