施工阶段1

This commit is contained in:
_Karasu_ 2022-08-04 13:44:15 +08:00
parent 34246720e6
commit 1776f5fd27
22 changed files with 2784 additions and 0 deletions

8
.idea/.gitignore vendored Normal file
View File

@ -0,0 +1,8 @@
# 默认忽略的文件
/shelf/
/workspace.xml
# 基于编辑器的 HTTP 客户端请求
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml

1
.idea/.name Normal file
View File

@ -0,0 +1 @@
tmp_policy

4
.idea/misc.xml Normal file
View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CMakeWorkspace" PROJECT_DIR="$PROJECT_DIR$" />
</project>

8
.idea/modules.xml Normal file
View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/tmp-policy.iml" filepath="$PROJECT_DIR$/.idea/tmp-policy.iml" />
</modules>
</component>
</project>

2
.idea/tmp-policy.iml Normal file
View File

@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<module classpath="CMake" type="CPP_MODULE" version="4" />

6
.idea/vcs.xml Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

6
CMakeLists.txt Normal file
View File

@ -0,0 +1,6 @@
cmake_minimum_required(VERSION 3.18)
project(tmp_policy)
set(CMAKE_CXX_STANDARD 14)
add_executable(tmp_policy main.cpp accpolicy.h policy_fundamentals.h)

53
accpolicy.h Normal file
View File

@ -0,0 +1,53 @@
// tmp_policy
// Created by lucas on 22-7-26.
// Re-implementation of a typical policy architecture in C++ Template Meta-Programming.
#ifndef TMP_POLICY_ACCPOLICY_H
#define TMP_POLICY_ACCPOLICY_H
// Policy Major Class definition.
struct AccPolicy {
using MajorClass = AccPolicy;
struct AccuTypeCate {
struct Add;
struct Mul;
};
using AccuType = AccuTypeCate::Add;
struct IsAveValueCate;
static constexpr bool IsAveValue = false;
struct ResultTypeCate;
using ResultType = int;
};
// Auxiliary Macros Definition.
#define TypePolicyObj(TName, TMajor, TMinor, TType) \
struct TName: virtual public TMajor { \
using MinorClass = TMinor##TypeCate; \
using TMinor##Type = TMinor##TypeCate::TType; \
}
#define ValuePolicyObj(TName, TMajor, TMinor, TValueType, TValue) \
struct TName: virtual public TMajor { \
using MinorClass = TMinor##ValueCate; \
static constexpr TValueType TMinor##Value = TValue; \
}
#define TypePolicyTemplate(TName, TMajor, TMinor) \
template <typename T> \
struct TName: virtual public TMajor{ \
using MinorClass = TMinor##TypeCate; \
using TMinor##Type = T; \
}
// Policy objects defined with auxiliary macros.
TypePolicyObj(PAdd, AccPolicy, Accu, Add);
TypePolicyObj(PMul, AccPolicy, Accu, Mul);
ValuePolicyObj(PAve, AccPolicy, IsAve, bool, true);
ValuePolicyObj(PNoAve, AccPolicy, IsAve, bool, false);
TypePolicyTemplate(PResultTypeIs, AccPolicy, Result);
#endif //TMP_POLICY_ACCPOLICY_H

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,759 @@
{
"inputs" :
[
{
"path" : "CMakeLists.txt"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/CMakeDetermineSystem.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/CMakeSystem.cmake.in"
},
{
"isGenerated" : true,
"path" : "cmake-build-debug/CMakeFiles/3.22.1/CMakeSystem.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/CMakeUnixFindMake.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/CMakeSystemSpecificInitialize.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/CMakeDetermineCCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/CMakeDetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/CMakeDetermineCompilerId.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/CMakeCompilerIdDetection.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Compiler/ADSP-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Compiler/ARMCC-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Compiler/ARMClang-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Compiler/AppleClang-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Compiler/Clang-DetermineCompilerInternal.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Compiler/Borland-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Compiler/Bruce-C-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Compiler/Clang-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Compiler/Clang-DetermineCompilerInternal.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Compiler/Compaq-C-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Compiler/Cray-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Compiler/Embarcadero-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Compiler/Fujitsu-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Compiler/FujitsuClang-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Compiler/GHS-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Compiler/GNU-C-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Compiler/HP-C-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Compiler/IAR-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Compiler/Intel-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Compiler/IntelLLVM-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Compiler/MSVC-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Compiler/NVHPC-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Compiler/NVIDIA-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Compiler/OpenWatcom-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Compiler/PGI-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Compiler/PathScale-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Compiler/SCO-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Compiler/SDCC-C-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Compiler/SunPro-C-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Compiler/TI-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Compiler/TinyCC-C-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Compiler/VisualAge-C-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Compiler/IBMCPP-C-DetermineVersionInternal.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Compiler/Watcom-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Compiler/XL-C-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Compiler/IBMCPP-C-DetermineVersionInternal.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Compiler/XLClang-C-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Compiler/zOS-C-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Compiler/IBMCPP-C-DetermineVersionInternal.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/CMakeFindBinUtils.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Compiler/Clang-FindBinUtils.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/CMakeCCompiler.cmake.in"
},
{
"isGenerated" : true,
"path" : "cmake-build-debug/CMakeFiles/3.22.1/CMakeCCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/CMakeDetermineCXXCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/CMakeDetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Platform/Linux-Determine-CXX.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/CMakeDetermineCompilerId.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/CMakeCompilerIdDetection.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Compiler/ADSP-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Compiler/ARMCC-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Compiler/ARMClang-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Compiler/AppleClang-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Compiler/Clang-DetermineCompilerInternal.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Compiler/Borland-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Compiler/Clang-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Compiler/Clang-DetermineCompilerInternal.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Compiler/Comeau-CXX-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Compiler/Compaq-CXX-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Compiler/Cray-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Compiler/Embarcadero-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Compiler/Fujitsu-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Compiler/FujitsuClang-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Compiler/GHS-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Compiler/GNU-CXX-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Compiler/HP-CXX-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Compiler/IAR-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Compiler/Intel-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Compiler/IntelLLVM-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Compiler/MSVC-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Compiler/NVHPC-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Compiler/NVIDIA-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Compiler/OpenWatcom-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Compiler/PGI-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Compiler/PathScale-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Compiler/SCO-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Compiler/SunPro-CXX-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Compiler/TI-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Compiler/VisualAge-CXX-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Compiler/IBMCPP-CXX-DetermineVersionInternal.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Compiler/Watcom-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Compiler/XL-CXX-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Compiler/IBMCPP-CXX-DetermineVersionInternal.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Compiler/XLClang-CXX-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Compiler/zOS-CXX-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Compiler/IBMCPP-CXX-DetermineVersionInternal.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/CMakeFindBinUtils.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Compiler/Clang-FindBinUtils.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/CMakeCXXCompiler.cmake.in"
},
{
"isGenerated" : true,
"path" : "cmake-build-debug/CMakeFiles/3.22.1/CMakeCXXCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/CMakeSystemSpecificInformation.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/CMakeGenericSystem.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/CMakeInitializeConfigs.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Platform/Linux.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Platform/UnixPaths.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/CMakeFindCodeBlocks.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/ProcessorCount.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/CMakeCInformation.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/CMakeLanguageInformation.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Compiler/Clang-C.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Compiler/Clang.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Compiler/CMakeCommonCompilerMacros.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Compiler/GNU.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Compiler/CMakeCommonCompilerMacros.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Platform/Linux-Clang-C.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Platform/Linux-GNU-C.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Platform/Linux-GNU.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/CMakeCommonLanguageInclude.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/CMakeTestCCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/CMakeTestCompilerCommon.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/CMakeDetermineCompilerABI.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/CMakeParseImplicitIncludeInfo.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/CMakeParseImplicitLinkInfo.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/CMakeParseLibraryArchitecture.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/CMakeTestCompilerCommon.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/CMakeCCompilerABI.c"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/CMakeDetermineCompileFeatures.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Internal/FeatureTesting.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/CMakeCCompiler.cmake.in"
},
{
"isGenerated" : true,
"path" : "cmake-build-debug/CMakeFiles/3.22.1/CMakeCCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/CMakeCXXInformation.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/CMakeLanguageInformation.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Compiler/Clang-CXX.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Compiler/Clang.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Platform/Linux-Clang-CXX.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Platform/Linux-GNU-CXX.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Platform/Linux-GNU.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/CMakeCommonLanguageInclude.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/CMakeTestCXXCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/CMakeTestCompilerCommon.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/CMakeDetermineCompilerABI.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/CMakeParseImplicitIncludeInfo.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/CMakeParseImplicitLinkInfo.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/CMakeParseLibraryArchitecture.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/CMakeTestCompilerCommon.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/CMakeCXXCompilerABI.cpp"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/CMakeDetermineCompileFeatures.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/Internal/FeatureTesting.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/usr/share/cmake-3.22/Modules/CMakeCXXCompiler.cmake.in"
},
{
"isGenerated" : true,
"path" : "cmake-build-debug/CMakeFiles/3.22.1/CMakeCXXCompiler.cmake"
}
],
"kind" : "cmakeFiles",
"paths" :
{
"build" : "/home/lucas/CLionProjects/tmp-policy/cmake-build-debug",
"source" : "/home/lucas/CLionProjects/tmp-policy"
},
"version" :
{
"major" : 1,
"minor" : 0
}
}

View File

@ -0,0 +1,60 @@
{
"configurations" :
[
{
"directories" :
[
{
"build" : ".",
"jsonFile" : "directory-.-Debug-f5ebdc15457944623624.json",
"minimumCMakeVersion" :
{
"string" : "3.18"
},
"projectIndex" : 0,
"source" : ".",
"targetIndexes" :
[
0
]
}
],
"name" : "Debug",
"projects" :
[
{
"directoryIndexes" :
[
0
],
"name" : "tmp_policy",
"targetIndexes" :
[
0
]
}
],
"targets" :
[
{
"directoryIndex" : 0,
"id" : "tmp_policy::@6890427a1f51a3e7e1df",
"jsonFile" : "target-tmp_policy-Debug-cda8d61ded076f2311ae.json",
"name" : "tmp_policy",
"projectIndex" : 0
}
]
}
],
"kind" : "codemodel",
"paths" :
{
"build" : "/home/lucas/CLionProjects/tmp-policy/cmake-build-debug",
"source" : "/home/lucas/CLionProjects/tmp-policy"
},
"version" :
{
"major" : 2,
"minor" : 3
}
}

View File

@ -0,0 +1,14 @@
{
"backtraceGraph" :
{
"commands" : [],
"files" : [],
"nodes" : []
},
"installers" : [],
"paths" :
{
"build" : ".",
"source" : "."
}
}

View File

@ -0,0 +1,108 @@
{
"cmake" :
{
"generator" :
{
"multiConfig" : false,
"name" : "Unix Makefiles"
},
"paths" :
{
"cmake" : "/usr/bin/cmake",
"cpack" : "/usr/bin/cpack",
"ctest" : "/usr/bin/ctest",
"root" : "/usr/share/cmake-3.22"
},
"version" :
{
"isDirty" : false,
"major" : 3,
"minor" : 22,
"patch" : 1,
"string" : "3.22.1",
"suffix" : ""
}
},
"objects" :
[
{
"jsonFile" : "codemodel-v2-d0b91aea16fe9089df17.json",
"kind" : "codemodel",
"version" :
{
"major" : 2,
"minor" : 3
}
},
{
"jsonFile" : "cache-v2-4327d0d10f6390084c1d.json",
"kind" : "cache",
"version" :
{
"major" : 2,
"minor" : 0
}
},
{
"jsonFile" : "cmakeFiles-v1-2d71857a96b31064ca46.json",
"kind" : "cmakeFiles",
"version" :
{
"major" : 1,
"minor" : 0
}
},
{
"jsonFile" : "toolchains-v1-d38fe39e3523af97f256.json",
"kind" : "toolchains",
"version" :
{
"major" : 1,
"minor" : 0
}
}
],
"reply" :
{
"cache-v2" :
{
"jsonFile" : "cache-v2-4327d0d10f6390084c1d.json",
"kind" : "cache",
"version" :
{
"major" : 2,
"minor" : 0
}
},
"cmakeFiles-v1" :
{
"jsonFile" : "cmakeFiles-v1-2d71857a96b31064ca46.json",
"kind" : "cmakeFiles",
"version" :
{
"major" : 1,
"minor" : 0
}
},
"codemodel-v2" :
{
"jsonFile" : "codemodel-v2-d0b91aea16fe9089df17.json",
"kind" : "codemodel",
"version" :
{
"major" : 2,
"minor" : 3
}
},
"toolchains-v1" :
{
"jsonFile" : "toolchains-v1-d38fe39e3523af97f256.json",
"kind" : "toolchains",
"version" :
{
"major" : 1,
"minor" : 0
}
}
}
}

View File

@ -0,0 +1,117 @@
{
"artifacts" :
[
{
"path" : "tmp_policy"
}
],
"backtrace" : 1,
"backtraceGraph" :
{
"commands" :
[
"add_executable"
],
"files" :
[
"CMakeLists.txt"
],
"nodes" :
[
{
"file" : 0
},
{
"command" : 0,
"file" : 0,
"line" : 6,
"parent" : 0
}
]
},
"compileGroups" :
[
{
"compileCommandFragments" :
[
{
"fragment" : "-g"
}
],
"language" : "CXX",
"languageStandard" :
{
"backtraces" :
[
1
],
"standard" : "14"
},
"sourceIndexes" :
[
0
]
}
],
"id" : "tmp_policy::@6890427a1f51a3e7e1df",
"link" :
{
"commandFragments" :
[
{
"fragment" : "-g",
"role" : "flags"
},
{
"fragment" : "",
"role" : "flags"
}
],
"language" : "CXX"
},
"name" : "tmp_policy",
"nameOnDisk" : "tmp_policy",
"paths" :
{
"build" : ".",
"source" : "."
},
"sourceGroups" :
[
{
"name" : "Source Files",
"sourceIndexes" :
[
0
]
},
{
"name" : "Header Files",
"sourceIndexes" :
[
1,
2
]
}
],
"sources" :
[
{
"backtrace" : 1,
"compileGroupIndex" : 0,
"path" : "main.cpp",
"sourceGroupIndex" : 0
},
{
"backtrace" : 1,
"path" : "accpolicy.h",
"sourceGroupIndex" : 1
},
{
"backtrace" : 1,
"path" : "policy_fundamentals.h",
"sourceGroupIndex" : 1
}
],
"type" : "EXECUTABLE"
}

View File

@ -0,0 +1,113 @@
{
"kind" : "toolchains",
"toolchains" :
[
{
"compiler" :
{
"id" : "Clang",
"implicit" :
{
"includeDirectories" :
[
"/usr/lib/llvm-13/lib/clang/13.0.1/include",
"/usr/local/include",
"/usr/include/x86_64-linux-gnu",
"/usr/include"
],
"linkDirectories" :
[
"/usr/lib/gcc/x86_64-linux-gnu/8",
"/usr/lib64",
"/lib/x86_64-linux-gnu",
"/lib64",
"/usr/lib/x86_64-linux-gnu",
"/usr/lib/llvm-13/lib",
"/lib",
"/usr/lib"
],
"linkFrameworkDirectories" : [],
"linkLibraries" :
[
"gcc",
"gcc_s",
"c",
"gcc",
"gcc_s"
]
},
"path" : "/usr/bin/clang",
"version" : "13.0.1"
},
"language" : "C",
"sourceFileExtensions" :
[
"c",
"m"
]
},
{
"compiler" :
{
"id" : "Clang",
"implicit" :
{
"includeDirectories" :
[
"/usr/include/c++/8",
"/usr/include/x86_64-linux-gnu/c++/8",
"/usr/include/c++/8/backward",
"/usr/lib/llvm-13/lib/clang/13.0.1/include",
"/usr/local/include",
"/usr/include/x86_64-linux-gnu",
"/usr/include"
],
"linkDirectories" :
[
"/usr/lib/gcc/x86_64-linux-gnu/8",
"/usr/lib64",
"/lib/x86_64-linux-gnu",
"/lib64",
"/usr/lib/x86_64-linux-gnu",
"/usr/lib/llvm-13/lib",
"/lib",
"/usr/lib"
],
"linkFrameworkDirectories" : [],
"linkLibraries" :
[
"stdc++",
"m",
"gcc_s",
"gcc",
"c",
"gcc_s",
"gcc"
]
},
"path" : "/usr/bin/clang++",
"version" : "13.0.1"
},
"language" : "CXX",
"sourceFileExtensions" :
[
"C",
"M",
"c++",
"cc",
"cpp",
"cxx",
"mm",
"mpp",
"CPP",
"ixx",
"cppm"
]
}
],
"version" :
{
"major" : 1,
"minor" : 0
}
}

View File

@ -0,0 +1,98 @@
<?xml version="1.0" encoding="UTF-8"?>
<CodeBlocks_project_file>
<FileVersion major="1" minor="6"/>
<Project>
<Option title="tmp_policy"/>
<Option makefile_is_custom="1"/>
<Option compiler="clang"/>
<Option virtualFolders="CMake Files\;"/>
<Build>
<Target title="all">
<Option working_dir="/home/lucas/CLionProjects/tmp-policy/cmake-build-debug"/>
<Option type="4"/>
<MakeCommands>
<Build command="/usr/bin/make -j16 -f &quot;/home/lucas/CLionProjects/tmp-policy/cmake-build-debug/Makefile&quot; VERBOSE=1 all"/>
<CompileFile command="/usr/bin/make -j16 -f &quot;/home/lucas/CLionProjects/tmp-policy/cmake-build-debug/Makefile&quot; VERBOSE=1 &quot;$file&quot;"/>
<Clean command="/usr/bin/make -j16 -f &quot;/home/lucas/CLionProjects/tmp-policy/cmake-build-debug/Makefile&quot; VERBOSE=1 clean"/>
<DistClean command="/usr/bin/make -j16 -f &quot;/home/lucas/CLionProjects/tmp-policy/cmake-build-debug/Makefile&quot; VERBOSE=1 clean"/>
</MakeCommands>
</Target>
<Target title="tmp_policy">
<Option output="/home/lucas/CLionProjects/tmp-policy/cmake-build-debug/tmp_policy" prefix_auto="0" extension_auto="0"/>
<Option working_dir="/home/lucas/CLionProjects/tmp-policy/cmake-build-debug"/>
<Option object_output="./"/>
<Option type="1"/>
<Option compiler="clang"/>
<Compiler>
<Add directory="/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8"/>
<Add directory="/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/x86_64-linux-gnu/c++/8"/>
<Add directory="/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/backward"/>
<Add directory="/usr/lib/llvm-13/lib/clang/13.0.1/include"/>
<Add directory="/usr/local/include"/>
<Add directory="/usr/include/x86_64-linux-gnu"/>
<Add directory="/usr/include"/>
</Compiler>
<MakeCommands>
<Build command="/usr/bin/make -j16 -f &quot;/home/lucas/CLionProjects/tmp-policy/cmake-build-debug/Makefile&quot; VERBOSE=1 tmp_policy"/>
<CompileFile command="/usr/bin/make -j16 -f &quot;/home/lucas/CLionProjects/tmp-policy/cmake-build-debug/Makefile&quot; VERBOSE=1 &quot;$file&quot;"/>
<Clean command="/usr/bin/make -j16 -f &quot;/home/lucas/CLionProjects/tmp-policy/cmake-build-debug/Makefile&quot; VERBOSE=1 clean"/>
<DistClean command="/usr/bin/make -j16 -f &quot;/home/lucas/CLionProjects/tmp-policy/cmake-build-debug/Makefile&quot; VERBOSE=1 clean"/>
</MakeCommands>
</Target>
<Target title="tmp_policy/fast">
<Option output="/home/lucas/CLionProjects/tmp-policy/cmake-build-debug/tmp_policy" prefix_auto="0" extension_auto="0"/>
<Option working_dir="/home/lucas/CLionProjects/tmp-policy/cmake-build-debug"/>
<Option object_output="./"/>
<Option type="1"/>
<Option compiler="clang"/>
<Compiler>
<Add directory="/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8"/>
<Add directory="/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/x86_64-linux-gnu/c++/8"/>
<Add directory="/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/backward"/>
<Add directory="/usr/lib/llvm-13/lib/clang/13.0.1/include"/>
<Add directory="/usr/local/include"/>
<Add directory="/usr/include/x86_64-linux-gnu"/>
<Add directory="/usr/include"/>
</Compiler>
<MakeCommands>
<Build command="/usr/bin/make -j16 -f &quot;/home/lucas/CLionProjects/tmp-policy/cmake-build-debug/Makefile&quot; VERBOSE=1 tmp_policy/fast"/>
<CompileFile command="/usr/bin/make -j16 -f &quot;/home/lucas/CLionProjects/tmp-policy/cmake-build-debug/Makefile&quot; VERBOSE=1 &quot;$file&quot;"/>
<Clean command="/usr/bin/make -j16 -f &quot;/home/lucas/CLionProjects/tmp-policy/cmake-build-debug/Makefile&quot; VERBOSE=1 clean"/>
<DistClean command="/usr/bin/make -j16 -f &quot;/home/lucas/CLionProjects/tmp-policy/cmake-build-debug/Makefile&quot; VERBOSE=1 clean"/>
</MakeCommands>
</Target>
<Target title="edit_cache">
<Option working_dir="/home/lucas/CLionProjects/tmp-policy/cmake-build-debug"/>
<Option type="4"/>
<MakeCommands>
<Build command="/usr/bin/make -j16 -f &quot;/home/lucas/CLionProjects/tmp-policy/cmake-build-debug/Makefile&quot; VERBOSE=1 edit_cache"/>
<CompileFile command="/usr/bin/make -j16 -f &quot;/home/lucas/CLionProjects/tmp-policy/cmake-build-debug/Makefile&quot; VERBOSE=1 &quot;$file&quot;"/>
<Clean command="/usr/bin/make -j16 -f &quot;/home/lucas/CLionProjects/tmp-policy/cmake-build-debug/Makefile&quot; VERBOSE=1 clean"/>
<DistClean command="/usr/bin/make -j16 -f &quot;/home/lucas/CLionProjects/tmp-policy/cmake-build-debug/Makefile&quot; VERBOSE=1 clean"/>
</MakeCommands>
</Target>
<Target title="rebuild_cache">
<Option working_dir="/home/lucas/CLionProjects/tmp-policy/cmake-build-debug"/>
<Option type="4"/>
<MakeCommands>
<Build command="/usr/bin/make -j16 -f &quot;/home/lucas/CLionProjects/tmp-policy/cmake-build-debug/Makefile&quot; VERBOSE=1 rebuild_cache"/>
<CompileFile command="/usr/bin/make -j16 -f &quot;/home/lucas/CLionProjects/tmp-policy/cmake-build-debug/Makefile&quot; VERBOSE=1 &quot;$file&quot;"/>
<Clean command="/usr/bin/make -j16 -f &quot;/home/lucas/CLionProjects/tmp-policy/cmake-build-debug/Makefile&quot; VERBOSE=1 clean"/>
<DistClean command="/usr/bin/make -j16 -f &quot;/home/lucas/CLionProjects/tmp-policy/cmake-build-debug/Makefile&quot; VERBOSE=1 clean"/>
</MakeCommands>
</Target>
</Build>
<Unit filename="/home/lucas/CLionProjects/tmp-policy/accpolicy.h">
<Option target="tmp_policy"/>
</Unit>
<Unit filename="/home/lucas/CLionProjects/tmp-policy/main.cpp">
<Option target="tmp_policy"/>
</Unit>
<Unit filename="/home/lucas/CLionProjects/tmp-policy/policy_fundamentals.h">
<Option target="tmp_policy"/>
</Unit>
<Unit filename="/home/lucas/CLionProjects/tmp-policy/CMakeLists.txt">
<Option virtualFolder="CMake Files\"/>
</Unit>
</Project>
</CodeBlocks_project_file>

6
main.cpp Normal file
View File

@ -0,0 +1,6 @@
#include <iostream>
int main() {
std::cout << "Hello, World!" << std::endl;
return 0;
}

138
policy_fundamentals.h Normal file
View File

@ -0,0 +1,138 @@
// tmp_policy
// Created by lucas on 22-7-26.
// Re-implementation of a typical policy architecture in C++ Template Meta-Programming.
#ifndef TMP_POLICY_POLICY_FUNDAMENTALS_H
#define TMP_POLICY_POLICY_FUNDAMENTALS_H
#include <type_traits>
// The container of policy objects.
template <typename ...>
struct PolicyContainer;
// This part of logic should not be accessed by the outside code.
namespace NSPolicySelect {
// Auxiliary Meta-Function: template <typename> constexpr bool IsArrayEmpty
// To indicate whether a PolicyContainer is empty or not.
// True branch: If the template parameter isn't PolicyContainer,
// or is a PolicyContainer with no element,
// the meta-function returns true.
template <typename T>
constexpr bool IsArrayEmpty = true;
// False branch: If the template parameter is a PolicyContainer
// with more than one element,
// the meta-function returns false.
template <typename TCurrent, typename ... TTypes>
constexpr bool IsArrayEmpty<PolicyContainer<TCurrent, TTypes...>> = false;
// Meta-Function: template <typename, typename> struct MajorFilter_;
// Remove the policy object whose MajorClass doesn't match with the first policy object.
// Also, the primitive template handles with the situation in which the two PolicyContainer are both empty.
template <typename TPolicyContainerModified, typename TPolicyContainerOriginal>
struct MajorFilter_
{
using type = PolicyContainer<>;
};
// Template specialization of MajorFilter_.
template <typename TFirstPolicy, typename ... TModifiedPolicies,
typename TCurPolicy, typename ... TOtherPolicies>
struct MajorFilter_<PolicyContainer<TFirstPolicy, TModifiedPolicies...>,
PolicyContainer<TCurPolicy, TOtherPolicies...>>
{
// The main logic of the loop.
// Use std::conditional_t to perform branch structure.
using type = std::conditional_t<
// Condition: Does TCurPolicy contain the same major class as the policy group?
std::is_same<typename TFirstPolicy::MajorClass, typename TCurPolicy::MajorClass>::value,
// True branch: If it does, add TCurPolicy to the policy group.
typename MajorFilter_<PolicyContainer<TFirstPolicy, TModifiedPolicies..., TCurPolicy>,
PolicyContainer<TOtherPolicies...>>::type,
// False branch: If it doesn't, skip TCurPolicy.
typename MajorFilter_<PolicyContainer<TFirstPolicy, TModifiedPolicies...>,
PolicyContainer<TOtherPolicies...>>::type
>;
// ... and recursively proceed with next element.
};
// Template specialization of MajorFilter_.
template <typename TEmptyContainer, typename TFirstPolicy, typename ... TOtherPolicies>
struct MajorFilter_<TEmptyContainer,
PolicyContainer<TFirstPolicy, TOtherPolicies...>>
{
// The beginning of the recursion.
// Simply put the first policy into the modified policy container.
using type = typename MajorFilter_<PolicyContainer<TFirstPolicy>,
PolicyContainer<TOtherPolicies...>>::type;
};
// Template specialization of MajorFilter_.
template <typename ... TPolicies, typename TEmptyContainer>
struct MajorFilter_<PolicyContainer<TPolicies...>, TEmptyContainer>
{
// Boundary of recursion: The proceeding policy container has no elements inside.
// Therefore, simply return the proceeded policy container.
using type = PolicyContainer<TPolicies...>;
};
// Auxiliary type definition: simplify the usage of MajorFilter_.
template <typename TPolicyCont>
using MajorFilter = typename MajorFilter_<PolicyContainer<>, TPolicyCont>::type;
// Meta-Function: template <typename, typename> struct MinorCheckInner_.
// Check whether the rest policy objects' MinorClass match with the current policy object or not.
// It performs as the inner loop of the minor check algorithm.
// Also, the primitive template handles with the boundary of recursion.
// It simply returns std::true_type when there is no policy object in the PolicyContainer.
template <typename TPolicy, typename TPolicyCont>
struct MinorCheckInner_
{
using type = std::true_type;
};
// Template specialization of MinorCheckInner_.
template <typename TPolicy, typename TCurPolicy, typename ... TRestPolicies>
struct MinorCheckInner_<TPolicy, PolicyContainer<TCurPolicy, TRestPolicies...>>
{
using type = std::conditional_t<
// The meta-function checks if two policy objects have the same minor class...
std::is_same<typename TPolicy::MinorClass, typename TCurPolicy::MinorClass>::value,
// ... if yes, simply returns false to end the recursion.
std::false_type,
// ... if no, proceeds check with TPolicy
// and the next policy object in the policy container.
typename MinorCheckInner_<TPolicy, PolicyContainer<TRestPolicies...>>::type
>;
};
// Meta-Function: template <typename> struct MinorCheckOuter_.
// For each policy object in the policy container,
// use MinorCheckInner_ to identify if there are another policy object
// having identical minor class.
template <typename TPolicyContainer>
struct MinorCheckOuter_
{
using type = std::true_type;
};
template <typename TCurPolicy, typename ... TRestPolicies>
struct MinorCheckOuter_<PolicyContainer<TCurPolicy, TRestPolicies...>>
{
private:
using InnerResult_ = typename MinorCheckInner_<TCurPolicy, PolicyContainer<TRestPolicies...>>::type;
public:
using type = std::conditional_t<
InnerResult_::value,
typename MinorCheckOuter_<PolicyContainer<TRestPolicies...>>::type,
std::false_type
>;
};
template <typename TPolicyContainer>
constexpr bool MinorCheck = MinorCheckOuter_<TPolicyContainer>::type::value;
}
#endif //TMP_POLICY_POLICY_FUNDAMENTALS_H