perf(templates): fix the redefinition of Swap function in private namespaces

This commit is contained in:
_Redstone_c_ 2022-03-26 19:31:45 +08:00
parent 3150e07f6b
commit e1871de73b
4 changed files with 6 additions and 7 deletions

View File

@ -1,8 +1,7 @@
#pragma once
#include "CoreTypes.h"
#include "TypeTraits/Miscellaneous.h"
#include "TypeTraits/TypeTraits.h"
NAMESPACE_REDCRAFT_BEGIN
NAMESPACE_MODULE_BEGIN(Redcraft)

View File

@ -1,6 +1,7 @@
#pragma once
#include "CoreTypes.h"
#include "Templates/Utility.h"
#include "Concepts/Comparable.h"
#include "TypeTraits/TypeTraits.h"
#include "Miscellaneous/AssertionMacros.h"

View File

@ -1,7 +1,9 @@
#pragma once
#include "CoreTypes.h"
#include "TypeTraits/TypeTraits.h"
#include "TypeTraits/CompositeType.h"
#include "TypeTraits/Miscellaneous.h"
#include "TypeTraits/SupportedOperations.h"
NAMESPACE_REDCRAFT_BEGIN
NAMESPACE_MODULE_BEGIN(Redcraft)

View File

@ -1,6 +1,7 @@
#pragma once
#include "CoreTypes.h"
#include "Templates/Utility.h"
#include "TypeTraits/HelperClasses.h"
NAMESPACE_REDCRAFT_BEGIN
@ -9,10 +10,6 @@ NAMESPACE_MODULE_BEGIN(Utility)
NAMESPACE_PRIVATE_BEGIN
// This is a copy of a declaration to prevent circular references, originally defined in Templates/Utility.h
template <typename T> requires TIsMoveConstructible<T>::Value&& TIsMoveAssignable<T>::Value
constexpr void Swap(T& A, T& B);
template <typename T, typename U>
concept CSwappableWith =
requires(T&& A, U&& B)