aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/common/Utilities/EventProcessor.h3
-rw-r--r--src/common/Utilities/Types.h4
-rw-r--r--src/common/Utilities/advstd.h17
-rw-r--r--src/server/game/Chat/ChatCommands/ChatCommand.h3
-rw-r--r--src/server/game/Chat/ChatCommands/ChatCommandTags.h3
5 files changed, 5 insertions, 25 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
diff --git a/src/server/game/Chat/ChatCommands/ChatCommand.h b/src/server/game/Chat/ChatCommands/ChatCommand.h
index 221dc03c35f..5188291fc5f 100644
--- a/src/server/game/Chat/ChatCommands/ChatCommand.h
+++ b/src/server/game/Chat/ChatCommands/ChatCommand.h
@@ -18,7 +18,6 @@
#ifndef TRINITY_CHATCOMMAND_H
#define TRINITY_CHATCOMMAND_H
-#include "advstd.h"
#include "ChatCommandArgs.h"
#include "ChatCommandTags.h"
#include "Define.h"
@@ -115,7 +114,7 @@ namespace Trinity::Impl::ChatCommands
}
template <typename T> struct HandlerToTuple { static_assert(Trinity::dependant_false_v<T>, "Invalid command handler signature"); };
- template <typename... Ts> struct HandlerToTuple<bool(ChatHandler*, Ts...)> { using type = std::tuple<ChatHandler*, advstd::remove_cvref_t<Ts>...>; };
+ template <typename... Ts> struct HandlerToTuple<bool(ChatHandler*, Ts...)> { using type = std::tuple<ChatHandler*, std::remove_cvref_t<Ts>...>; };
template <typename T> using TupleType = typename HandlerToTuple<T>::type;
struct CommandInvoker
diff --git a/src/server/game/Chat/ChatCommands/ChatCommandTags.h b/src/server/game/Chat/ChatCommands/ChatCommandTags.h
index 19daf234deb..ff47867ae3c 100644
--- a/src/server/game/Chat/ChatCommands/ChatCommandTags.h
+++ b/src/server/game/Chat/ChatCommands/ChatCommandTags.h
@@ -18,7 +18,6 @@
#ifndef TRINITY_CHATCOMMANDTAGS_H
#define TRINITY_CHATCOMMANDTAGS_H
-#include "advstd.h"
#include "ChatCommandHelpers.h"
#include "Hyperlinks.h"
#include "ObjectGuid.h"
@@ -211,7 +210,7 @@ namespace Trinity::ChatCommands
struct Hyperlink : Trinity::Impl::ChatCommands::ContainerTag
{
using value_type = typename linktag::value_type;
- using storage_type = advstd::remove_cvref_t<value_type>;
+ using storage_type = std::remove_cvref_t<value_type>;
operator value_type() const { return val; }
value_type operator*() const { return val; }