Skip to content
Permalink
Browse files
The Future is Now: __cpp_lib_concepts
Replaces "Common/Future/CppLibConcepts.h" with <concepts>
  • Loading branch information
Minty-Meeo committed Apr 14, 2023
1 parent a735128 commit 3304db9
Show file tree
Hide file tree
Showing 18 changed files with 17 additions and 73 deletions.
@@ -2,10 +2,9 @@

#pragma once

#include <concepts>
#include <cstddef>

#include "Common/Future/CppLibConcepts.h"

namespace Common
{
template <std::unsigned_integral T>
@@ -3,14 +3,13 @@
#pragma once

#include <bit>
#include <concepts>
#include <cstddef>
#include <initializer_list>
#include <type_traits>

#include "Common/CommonTypes.h"

#include "Common/Future/CppLibConcepts.h"

namespace Common
{
// Similar to std::bitset, this is a class which encapsulates a bitset, i.e.
@@ -5,6 +5,7 @@

#include <array>
#include <climits>
#include <concepts>
#include <cstddef>
#include <cstdint>
#include <cstring>
@@ -13,8 +14,6 @@

#include "Common/Concepts.h"

#include "Common/Future/CppLibConcepts.h"

namespace Common
{
///
@@ -59,7 +59,6 @@ add_library(common
FloatUtils.h
FormatUtil.h
FPURoundMode.h
Future/CppLibConcepts.h
GekkoDisassembler.cpp
GekkoDisassembler.h
Hash.cpp
@@ -2,13 +2,12 @@

#pragma once

#include <concepts>
#include <cstddef>
#include <type_traits>

#include "Common/TypeUtils.h"

#include "Common/Future/CppLibConcepts.h"

namespace Common
{
template <class T>

This file was deleted.

@@ -6,14 +6,13 @@
#include <algorithm>
#include <bit>
#include <cmath>
#include <concepts>
#include <limits>
#include <type_traits>
#include <vector>

#include "Common/CommonTypes.h"

#include "Common/Future/CppLibConcepts.h"

namespace MathUtil
{
constexpr double TAU = 6.2831853071795865;
@@ -3,6 +3,7 @@

#pragma once

#include <concepts>
#include <cstdarg>
#include <cstddef>
#include <cstdlib>
@@ -18,8 +19,6 @@
#include "Common/CommonTypes.h"
#include "Common/Concepts.h"

#include "Common/Future/CppLibConcepts.h"

std::string StringFromFormatV(const char* format, va_list args);

std::string StringFromFormat(const char* format, ...)
@@ -10,10 +10,9 @@
#include "Core/PowerPC/MMU.h"
#include "Core/PowerPC/PowerPC.h"

#include <concepts>
#include <type_traits>

#include "Common/Future/CppLibConcepts.h"

namespace Core
{
class CPUThreadGuard;
@@ -5,6 +5,7 @@

#include <array>
#include <atomic>
#include <concepts>
#include <string>
#include <tuple>

@@ -17,8 +18,6 @@
#include "Core/HW/MMIOHandlers.h"
#include "Core/System.h"

#include "Common/Future/CppLibConcepts.h"

namespace MMIO
{
// There are three main MMIO blocks on the Wii (only one on the GameCube):
@@ -26,6 +26,7 @@
#include "Core/PowerPC/MMU.h"

#include <bit>
#include <concepts>
#include <cstddef>
#include <cstring>
#include <string>
@@ -50,8 +51,6 @@

#include "VideoCommon/VideoBackendBase.h"

#include "Common/Future/CppLibConcepts.h"

namespace PowerPC
{
MMU::MMU(Core::System& system, Memory::MemoryManager& memory, PowerPC::PowerPCManager& power_pc)
@@ -4,15 +4,14 @@
#pragma once

#include <array>
#include <concepts>
#include <cstddef>
#include <optional>
#include <string>

#include "Common/BitField.h"
#include "Common/CommonTypes.h"

#include "Common/Future/CppLibConcepts.h"

namespace Core
{
class CPUThreadGuard;
@@ -4,6 +4,7 @@
#pragma once

#include <cmath>
#include <concepts>
#include <memory>
#include <mutex>
#include <string>
@@ -18,8 +19,6 @@
#include "InputCommon/ControllerEmu/ControlGroup/ControlGroup.h"
#include "InputCommon/ControllerInterface/CoreDevice.h"

#include "Common/Future/CppLibConcepts.h"

class ControllerInterface;

constexpr const char* DIRECTION_UP = _trans("Up");
@@ -7,8 +7,6 @@
#include "Common/StringUtil.h"
#include "VideoCommon/TextureCacheBase.h"

#include "Common/Future/CppLibConcepts.h"

namespace
{
template <std::derived_from<FBTarget> T>
@@ -3,6 +3,8 @@

#pragma once

#include <concepts>

#include "Common/Assert.h"
#include "Common/CommonTypes.h"
#include "Common/EnumFormatter.h"
@@ -11,8 +13,6 @@
#include "VideoCommon/CPMemory.h"
#include "VideoCommon/VertexLoaderBase.h"

#include "Common/Future/CppLibConcepts.h"

struct CPState;
class DataReader;

@@ -4,6 +4,7 @@
#include "VideoCommon/VertexLoader_Normal.h"

#include <array>
#include <concepts>
#include <type_traits>

#include "Common/CommonTypes.h"
@@ -13,8 +14,6 @@
#include "VideoCommon/VertexLoaderManager.h"
#include "VideoCommon/VertexLoaderUtils.h"

#include "Common/Future/CppLibConcepts.h"

// warning: mapping buffer should be disabled to use this
#define LOG_NORM() // PRIM_LOG("norm: {} {} {}, ", ((float*)g_vertex_manager_write_ptr)[-3],
// ((float*)g_vertex_manager_write_ptr)[-2],
@@ -3,6 +3,7 @@

#include "VideoCommon/VertexLoader_Position.h"

#include <concepts>
#include <limits>

#include "Common/CommonTypes.h"
@@ -14,8 +15,6 @@
#include "VideoCommon/VertexLoaderUtils.h"
#include "VideoCommon/VideoCommon.h"

#include "Common/Future/CppLibConcepts.h"

namespace
{
template <typename T>
@@ -3,15 +3,15 @@

#include "VideoCommon/VertexLoader_TextCoord.h"

#include <concepts>

#include "Common/CommonTypes.h"
#include "Common/Swap.h"

#include "VideoCommon/VertexLoader.h"
#include "VideoCommon/VertexLoaderManager.h"
#include "VideoCommon/VertexLoaderUtils.h"

#include "Common/Future/CppLibConcepts.h"

namespace
{
void TexCoord_Read_Dummy(VertexLoader* loader)

0 comments on commit 3304db9

Please sign in to comment.