From 04191c8d4c2ca0597605101827ffec8905efe58d Mon Sep 17 00:00:00 2001 From: hyde zhou Date: Thu, 9 Jun 2022 21:24:06 +0800 Subject: [PATCH] uses ccstd::variant instead of boost::variant2::variant (#11437) --- native/cocos/base/std/variant.h | 2 + .../renderer/pipeline/custom/GraphImpl.h | 6 +- .../renderer/pipeline/custom/LayoutGraphFwd.h | 2 +- .../pipeline/custom/LayoutGraphGraphs.h | 64 ++--- .../pipeline/custom/LayoutGraphTypes.h | 16 +- .../pipeline/custom/NativePipelineFwd.h | 2 +- .../cocos/renderer/pipeline/custom/Overload.h | 4 +- .../pipeline/custom/RenderCommonFwd.h | 2 +- .../renderer/pipeline/custom/RenderGraphFwd.h | 2 +- .../pipeline/custom/RenderGraphGraphs.h | 240 +++++++++--------- .../pipeline/custom/RenderGraphTypes.h | 16 +- .../pipeline/custom/RenderInterfaceFwd.h | 2 +- 12 files changed, 180 insertions(+), 178 deletions(-) diff --git a/native/cocos/base/std/variant.h b/native/cocos/base/std/variant.h index 41c047bfdb..6bc1da573c 100644 --- a/native/cocos/base/std/variant.h +++ b/native/cocos/base/std/variant.h @@ -37,6 +37,7 @@ using std::holds_alternative; using std::monostate; using std::variant; using std::visit; +using std::in_place_index; }; // namespace ccstd @@ -52,6 +53,7 @@ using boost::variant2::holds_alternative; using boost::variant2::monostate; using boost::variant2::variant; using boost::variant2::visit; +using boost::variant2::in_place_index; }; // namespace ccstd #endif diff --git a/native/cocos/renderer/pipeline/custom/GraphImpl.h b/native/cocos/renderer/pipeline/custom/GraphImpl.h index 515c4f18ea..767c14c146 100644 --- a/native/cocos/renderer/pipeline/custom/GraphImpl.h +++ b/native/cocos/renderer/pipeline/custom/GraphImpl.h @@ -27,9 +27,9 @@ #include #include #include -#include #include #include "base/std/container/vector.h" +#include "base/std/variant.h" #include "renderer/pipeline/custom/GraphTypes.h" #include "renderer/pipeline/custom/GslUtils.h" @@ -500,8 +500,8 @@ inline void reindexVectorHandle(Container &container, HandleDescriptor u) { using handle_type = ValueHandle; for (auto &vert : container) { - if (boost::variant2::holds_alternative(vert.handle)) { - auto &v = boost::variant2::get(vert.handle).value; + if (ccstd::holds_alternative(vert.handle)) { + auto &v = ccstd::get(vert.handle).value; if (v > u) { --v; } diff --git a/native/cocos/renderer/pipeline/custom/LayoutGraphFwd.h b/native/cocos/renderer/pipeline/custom/LayoutGraphFwd.h index 01c8187240..9ea5c073f8 100644 --- a/native/cocos/renderer/pipeline/custom/LayoutGraphFwd.h +++ b/native/cocos/renderer/pipeline/custom/LayoutGraphFwd.h @@ -30,8 +30,8 @@ */ // clang-format off #pragma once -#include #include +#include "cocos/base/std/variant.h" #include "cocos/renderer/gfx-base/GFXDef-common.h" #include "cocos/renderer/pipeline/custom/RenderCommonFwd.h" diff --git a/native/cocos/renderer/pipeline/custom/LayoutGraphGraphs.h b/native/cocos/renderer/pipeline/custom/LayoutGraphGraphs.h index 1190b68660..20d7334e58 100644 --- a/native/cocos/renderer/pipeline/custom/LayoutGraphGraphs.h +++ b/native/cocos/renderer/pipeline/custom/LayoutGraphGraphs.h @@ -776,7 +776,7 @@ holds(LayoutGraph::vertex_descriptor v, const LayoutGraph& g) noexcept; template <> inline bool holds(LayoutGraph::vertex_descriptor v, const LayoutGraph& g) noexcept { - return boost::variant2::holds_alternative< + return ccstd::holds_alternative< impl::ValueHandle>( g.vertices[v].handle); } @@ -784,7 +784,7 @@ holds(LayoutGraph::vertex_descriptor v, const LayoutGraph& g) no template <> inline bool holds(LayoutGraph::vertex_descriptor v, const LayoutGraph& g) noexcept { - return boost::variant2::holds_alternative< + return ccstd::holds_alternative< impl::ValueHandle>( g.vertices[v].handle); } @@ -796,7 +796,7 @@ holds_alternative(LayoutGraph::vertex_descriptor v, const LayoutGraph& g) noexce template <> inline bool holds_alternative(LayoutGraph::vertex_descriptor v, const LayoutGraph& g) noexcept { // NOLINT - return boost::variant2::holds_alternative< + return ccstd::holds_alternative< impl::ValueHandle>( g.vertices[v].handle); } @@ -804,7 +804,7 @@ holds_alternative(LayoutGraph::vertex_descriptor v, const LayoutGraph& template <> inline bool holds_alternative(LayoutGraph::vertex_descriptor v, const LayoutGraph& g) noexcept { // NOLINT - return boost::variant2::holds_alternative< + return ccstd::holds_alternative< impl::ValueHandle>( g.vertices[v].handle); } @@ -816,7 +816,7 @@ get(LayoutGraph::vertex_descriptor /*v*/, LayoutGraph& /*g*/); template <> inline uint32_t& get(LayoutGraph::vertex_descriptor v, LayoutGraph& g) { - auto& handle = boost::variant2::get< + auto& handle = ccstd::get< impl::ValueHandle>( g.vertices[v].handle); return g.stages[handle.value]; @@ -825,7 +825,7 @@ get(LayoutGraph::vertex_descriptor v, LayoutGraph& g) { template <> inline RenderPhase& get(LayoutGraph::vertex_descriptor v, LayoutGraph& g) { - auto& handle = boost::variant2::get< + auto& handle = ccstd::get< impl::ValueHandle>( g.vertices[v].handle); return g.phases[handle.value]; @@ -838,7 +838,7 @@ get(LayoutGraph::vertex_descriptor /*v*/, const LayoutGraph& /*g*/); template <> inline const uint32_t& get(LayoutGraph::vertex_descriptor v, const LayoutGraph& g) { - const auto& handle = boost::variant2::get< + const auto& handle = ccstd::get< impl::ValueHandle>( g.vertices[v].handle); return g.stages[handle.value]; @@ -847,7 +847,7 @@ get(LayoutGraph::vertex_descriptor v, const LayoutGraph& g) { template <> inline const RenderPhase& get(LayoutGraph::vertex_descriptor v, const LayoutGraph& g) { - const auto& handle = boost::variant2::get< + const auto& handle = ccstd::get< impl::ValueHandle>( g.vertices[v].handle); return g.phases[handle.value]; @@ -855,7 +855,7 @@ get(LayoutGraph::vertex_descriptor v, const LayoutGraph& g) { inline uint32_t& get(RenderStageTag /*tag*/, LayoutGraph::vertex_descriptor v, LayoutGraph& g) { - auto& handle = boost::variant2::get< + auto& handle = ccstd::get< impl::ValueHandle>( g.vertices[v].handle); return g.stages[handle.value]; @@ -863,7 +863,7 @@ get(RenderStageTag /*tag*/, LayoutGraph::vertex_descriptor v, LayoutGraph& g) { inline RenderPhase& get(RenderPhaseTag /*tag*/, LayoutGraph::vertex_descriptor v, LayoutGraph& g) { - auto& handle = boost::variant2::get< + auto& handle = ccstd::get< impl::ValueHandle>( g.vertices[v].handle); return g.phases[handle.value]; @@ -871,7 +871,7 @@ get(RenderPhaseTag /*tag*/, LayoutGraph::vertex_descriptor v, LayoutGraph& g) { inline const uint32_t& get(RenderStageTag /*tag*/, LayoutGraph::vertex_descriptor v, const LayoutGraph& g) { - const auto& handle = boost::variant2::get< + const auto& handle = ccstd::get< impl::ValueHandle>( g.vertices[v].handle); return g.stages[handle.value]; @@ -879,7 +879,7 @@ get(RenderStageTag /*tag*/, LayoutGraph::vertex_descriptor v, const LayoutGraph& inline const RenderPhase& get(RenderPhaseTag /*tag*/, LayoutGraph::vertex_descriptor v, const LayoutGraph& g) { - const auto& handle = boost::variant2::get< + const auto& handle = ccstd::get< impl::ValueHandle>( g.vertices[v].handle); return g.phases[handle.value]; @@ -897,7 +897,7 @@ get_if(LayoutGraph::vertex_descriptor v, LayoutGraph* pGraph) noexcept return ptr; } auto& g = *pGraph; - auto* pHandle = boost::variant2::get_if< + auto* pHandle = ccstd::get_if< impl::ValueHandle>( &g.vertices[v].handle); if (pHandle) { @@ -914,7 +914,7 @@ get_if(LayoutGraph::vertex_descriptor v, LayoutGraph* pGraph) noexc return ptr; } auto& g = *pGraph; - auto* pHandle = boost::variant2::get_if< + auto* pHandle = ccstd::get_if< impl::ValueHandle>( &g.vertices[v].handle); if (pHandle) { @@ -935,7 +935,7 @@ get_if(LayoutGraph::vertex_descriptor v, const LayoutGraph* pGraph) no return ptr; } const auto& g = *pGraph; - const auto* pHandle = boost::variant2::get_if< + const auto* pHandle = ccstd::get_if< impl::ValueHandle>( &g.vertices[v].handle); if (pHandle) { @@ -952,7 +952,7 @@ get_if(LayoutGraph::vertex_descriptor v, const LayoutGraph* pGraph) return ptr; } const auto& g = *pGraph; - const auto* pHandle = boost::variant2::get_if< + const auto* pHandle = ccstd::get_if< impl::ValueHandle>( &g.vertices[v].handle); if (pHandle) { @@ -1476,7 +1476,7 @@ holds(LayoutGraphData::vertex_descriptor v, const LayoutGraphData& g) noexcept; template <> inline bool holds(LayoutGraphData::vertex_descriptor v, const LayoutGraphData& g) noexcept { - return boost::variant2::holds_alternative< + return ccstd::holds_alternative< impl::ValueHandle>( g.vertices[v].handle); } @@ -1484,7 +1484,7 @@ holds(LayoutGraphData::vertex_descriptor v, const LayoutGraphDat template <> inline bool holds(LayoutGraphData::vertex_descriptor v, const LayoutGraphData& g) noexcept { - return boost::variant2::holds_alternative< + return ccstd::holds_alternative< impl::ValueHandle>( g.vertices[v].handle); } @@ -1496,7 +1496,7 @@ holds_alternative(LayoutGraphData::vertex_descriptor v, const LayoutGraphData& g template <> inline bool holds_alternative(LayoutGraphData::vertex_descriptor v, const LayoutGraphData& g) noexcept { // NOLINT - return boost::variant2::holds_alternative< + return ccstd::holds_alternative< impl::ValueHandle>( g.vertices[v].handle); } @@ -1504,7 +1504,7 @@ holds_alternative(LayoutGraphData::vertex_descriptor v, const L template <> inline bool holds_alternative(LayoutGraphData::vertex_descriptor v, const LayoutGraphData& g) noexcept { // NOLINT - return boost::variant2::holds_alternative< + return ccstd::holds_alternative< impl::ValueHandle>( g.vertices[v].handle); } @@ -1516,7 +1516,7 @@ get(LayoutGraphData::vertex_descriptor /*v*/, LayoutGraphData& /*g*/); template <> inline RenderStageData& get(LayoutGraphData::vertex_descriptor v, LayoutGraphData& g) { - auto& handle = boost::variant2::get< + auto& handle = ccstd::get< impl::ValueHandle>( g.vertices[v].handle); return g.stages[handle.value]; @@ -1525,7 +1525,7 @@ get(LayoutGraphData::vertex_descriptor v, LayoutGraphData& g) { template <> inline RenderPhaseData& get(LayoutGraphData::vertex_descriptor v, LayoutGraphData& g) { - auto& handle = boost::variant2::get< + auto& handle = ccstd::get< impl::ValueHandle>( g.vertices[v].handle); return g.phases[handle.value]; @@ -1538,7 +1538,7 @@ get(LayoutGraphData::vertex_descriptor /*v*/, const LayoutGraphData& /*g*/); template <> inline const RenderStageData& get(LayoutGraphData::vertex_descriptor v, const LayoutGraphData& g) { - const auto& handle = boost::variant2::get< + const auto& handle = ccstd::get< impl::ValueHandle>( g.vertices[v].handle); return g.stages[handle.value]; @@ -1547,7 +1547,7 @@ get(LayoutGraphData::vertex_descriptor v, const LayoutGraphData template <> inline const RenderPhaseData& get(LayoutGraphData::vertex_descriptor v, const LayoutGraphData& g) { - const auto& handle = boost::variant2::get< + const auto& handle = ccstd::get< impl::ValueHandle>( g.vertices[v].handle); return g.phases[handle.value]; @@ -1555,7 +1555,7 @@ get(LayoutGraphData::vertex_descriptor v, const LayoutGraphData inline RenderStageData& get(RenderStageTag /*tag*/, LayoutGraphData::vertex_descriptor v, LayoutGraphData& g) { - auto& handle = boost::variant2::get< + auto& handle = ccstd::get< impl::ValueHandle>( g.vertices[v].handle); return g.stages[handle.value]; @@ -1563,7 +1563,7 @@ get(RenderStageTag /*tag*/, LayoutGraphData::vertex_descriptor v, LayoutGraphDat inline RenderPhaseData& get(RenderPhaseTag /*tag*/, LayoutGraphData::vertex_descriptor v, LayoutGraphData& g) { - auto& handle = boost::variant2::get< + auto& handle = ccstd::get< impl::ValueHandle>( g.vertices[v].handle); return g.phases[handle.value]; @@ -1571,7 +1571,7 @@ get(RenderPhaseTag /*tag*/, LayoutGraphData::vertex_descriptor v, LayoutGraphDat inline const RenderStageData& get(RenderStageTag /*tag*/, LayoutGraphData::vertex_descriptor v, const LayoutGraphData& g) { - const auto& handle = boost::variant2::get< + const auto& handle = ccstd::get< impl::ValueHandle>( g.vertices[v].handle); return g.stages[handle.value]; @@ -1579,7 +1579,7 @@ get(RenderStageTag /*tag*/, LayoutGraphData::vertex_descriptor v, const LayoutGr inline const RenderPhaseData& get(RenderPhaseTag /*tag*/, LayoutGraphData::vertex_descriptor v, const LayoutGraphData& g) { - const auto& handle = boost::variant2::get< + const auto& handle = ccstd::get< impl::ValueHandle>( g.vertices[v].handle); return g.phases[handle.value]; @@ -1597,7 +1597,7 @@ get_if(LayoutGraphData::vertex_descriptor v, LayoutGraphData* p return ptr; } auto& g = *pGraph; - auto* pHandle = boost::variant2::get_if< + auto* pHandle = ccstd::get_if< impl::ValueHandle>( &g.vertices[v].handle); if (pHandle) { @@ -1614,7 +1614,7 @@ get_if(LayoutGraphData::vertex_descriptor v, LayoutGraphData* p return ptr; } auto& g = *pGraph; - auto* pHandle = boost::variant2::get_if< + auto* pHandle = ccstd::get_if< impl::ValueHandle>( &g.vertices[v].handle); if (pHandle) { @@ -1635,7 +1635,7 @@ get_if(LayoutGraphData::vertex_descriptor v, const LayoutGraphD return ptr; } const auto& g = *pGraph; - const auto* pHandle = boost::variant2::get_if< + const auto* pHandle = ccstd::get_if< impl::ValueHandle>( &g.vertices[v].handle); if (pHandle) { @@ -1652,7 +1652,7 @@ get_if(LayoutGraphData::vertex_descriptor v, const LayoutGraphD return ptr; } const auto& g = *pGraph; - const auto* pHandle = boost::variant2::get_if< + const auto* pHandle = ccstd::get_if< impl::ValueHandle>( &g.vertices[v].handle); if (pHandle) { diff --git a/native/cocos/renderer/pipeline/custom/LayoutGraphTypes.h b/native/cocos/renderer/pipeline/custom/LayoutGraphTypes.h index bee2ab6324..4e79d6bd04 100644 --- a/native/cocos/renderer/pipeline/custom/LayoutGraphTypes.h +++ b/native/cocos/renderer/pipeline/custom/LayoutGraphTypes.h @@ -262,10 +262,10 @@ struct LayoutGraph { } // PolymorphicGraph - using VertexTag = boost::variant2::variant; - using VertexValue = boost::variant2::variant; - using VertexConstValue = boost::variant2::variant; - using VertexHandle = boost::variant2::variant< + using VertexTag = ccstd::variant; + using VertexValue = ccstd::variant; + using VertexConstValue = ccstd::variant; + using VertexHandle = ccstd::variant< impl::ValueHandle, impl::ValueHandle>; @@ -620,10 +620,10 @@ struct LayoutGraphData { } // PolymorphicGraph - using VertexTag = boost::variant2::variant; - using VertexValue = boost::variant2::variant; - using VertexConstValue = boost::variant2::variant; - using VertexHandle = boost::variant2::variant< + using VertexTag = ccstd::variant; + using VertexValue = ccstd::variant; + using VertexConstValue = ccstd::variant; + using VertexHandle = ccstd::variant< impl::ValueHandle, impl::ValueHandle>; diff --git a/native/cocos/renderer/pipeline/custom/NativePipelineFwd.h b/native/cocos/renderer/pipeline/custom/NativePipelineFwd.h index 58567b2a58..7a86f8fa05 100644 --- a/native/cocos/renderer/pipeline/custom/NativePipelineFwd.h +++ b/native/cocos/renderer/pipeline/custom/NativePipelineFwd.h @@ -30,7 +30,7 @@ */ // clang-format off #pragma once -#include +#include "cocos/base/std/variant.h" #include "cocos/renderer/frame-graph/FrameGraph.h" #include "cocos/renderer/pipeline/custom/RenderInterfaceFwd.h" diff --git a/native/cocos/renderer/pipeline/custom/Overload.h b/native/cocos/renderer/pipeline/custom/Overload.h index 5e0bdef2d8..9607ab9e18 100644 --- a/native/cocos/renderer/pipeline/custom/Overload.h +++ b/native/cocos/renderer/pipeline/custom/Overload.h @@ -25,8 +25,8 @@ #pragma once -#include "boost/variant2/variant.hpp" #include "boost/mp11/algorithm.hpp" +#include "cocos/base/std/variant.h" #include #include @@ -61,7 +61,7 @@ Overloaded overload(Ts... ts) { template auto variantFromIndex(size_t index) -> V { // NOLINT return boost::mp11::mp_with_index>(index, - [](auto i) { return V(boost::variant2::in_place_index); }); + [](auto i) { return V(ccstd::in_place_index); }); } } // namespace cc diff --git a/native/cocos/renderer/pipeline/custom/RenderCommonFwd.h b/native/cocos/renderer/pipeline/custom/RenderCommonFwd.h index 87b6ee3da1..11910d7620 100644 --- a/native/cocos/renderer/pipeline/custom/RenderCommonFwd.h +++ b/native/cocos/renderer/pipeline/custom/RenderCommonFwd.h @@ -30,7 +30,7 @@ */ // clang-format off #pragma once -#include +#include "cocos/base/std/variant.h" namespace cc { diff --git a/native/cocos/renderer/pipeline/custom/RenderGraphFwd.h b/native/cocos/renderer/pipeline/custom/RenderGraphFwd.h index fc169c06f3..0de53d2c5c 100644 --- a/native/cocos/renderer/pipeline/custom/RenderGraphFwd.h +++ b/native/cocos/renderer/pipeline/custom/RenderGraphFwd.h @@ -30,7 +30,7 @@ */ // clang-format off #pragma once -#include +#include "cocos/base/std/variant.h" #include "cocos/renderer/gfx-base/GFXDef-common.h" #include "cocos/renderer/pipeline/PipelineSceneData.h" #include "cocos/renderer/pipeline/custom/RenderCommonFwd.h" diff --git a/native/cocos/renderer/pipeline/custom/RenderGraphGraphs.h b/native/cocos/renderer/pipeline/custom/RenderGraphGraphs.h index 2d096d6acf..c073c761ba 100644 --- a/native/cocos/renderer/pipeline/custom/RenderGraphGraphs.h +++ b/native/cocos/renderer/pipeline/custom/RenderGraphGraphs.h @@ -1420,7 +1420,7 @@ holds(ResourceGraph::vertex_descriptor v, const ResourceGraph& g) noexcept; template <> inline bool holds(ResourceGraph::vertex_descriptor v, const ResourceGraph& g) noexcept { - return boost::variant2::holds_alternative< + return ccstd::holds_alternative< impl::ValueHandle>( g.vertices[v].handle); } @@ -1428,7 +1428,7 @@ holds(ResourceGraph::vertex_descriptor v, const ResourceGraph& g) no template <> inline bool holds(ResourceGraph::vertex_descriptor v, const ResourceGraph& g) noexcept { - return boost::variant2::holds_alternative< + return ccstd::holds_alternative< impl::ValueHandle>( g.vertices[v].handle); } @@ -1436,7 +1436,7 @@ holds(ResourceGraph::vertex_descriptor v, const ResourceGra template <> inline bool holds(ResourceGraph::vertex_descriptor v, const ResourceGraph& g) noexcept { - return boost::variant2::holds_alternative< + return ccstd::holds_alternative< impl::ValueHandle>( g.vertices[v].handle); } @@ -1444,7 +1444,7 @@ holds(ResourceGraph::vertex_descriptor v, const ResourceGr template <> inline bool holds(ResourceGraph::vertex_descriptor v, const ResourceGraph& g) noexcept { - return boost::variant2::holds_alternative< + return ccstd::holds_alternative< impl::ValueHandle>( g.vertices[v].handle); } @@ -1452,7 +1452,7 @@ holds(ResourceGraph::vertex_descriptor v, const ResourceGraph& g template <> inline bool holds(ResourceGraph::vertex_descriptor v, const ResourceGraph& g) noexcept { - return boost::variant2::holds_alternative< + return ccstd::holds_alternative< impl::ValueHandle>( g.vertices[v].handle); } @@ -1464,7 +1464,7 @@ holds_alternative(ResourceGraph::vertex_descriptor v, const ResourceGraph& g) no template <> inline bool holds_alternative(ResourceGraph::vertex_descriptor v, const ResourceGraph& g) noexcept { // NOLINT - return boost::variant2::holds_alternative< + return ccstd::holds_alternative< impl::ValueHandle>( g.vertices[v].handle); } @@ -1472,7 +1472,7 @@ holds_alternative(ResourceGraph::vertex_descriptor v, const Res template <> inline bool holds_alternative>(ResourceGraph::vertex_descriptor v, const ResourceGraph& g) noexcept { // NOLINT - return boost::variant2::holds_alternative< + return ccstd::holds_alternative< impl::ValueHandle>( g.vertices[v].handle); } @@ -1480,7 +1480,7 @@ holds_alternative>(ResourceGraph::vertex_descriptor v, template <> inline bool holds_alternative>(ResourceGraph::vertex_descriptor v, const ResourceGraph& g) noexcept { // NOLINT - return boost::variant2::holds_alternative< + return ccstd::holds_alternative< impl::ValueHandle>( g.vertices[v].handle); } @@ -1488,7 +1488,7 @@ holds_alternative>(ResourceGraph::vertex_descriptor v template <> inline bool holds_alternative>(ResourceGraph::vertex_descriptor v, const ResourceGraph& g) noexcept { // NOLINT - return boost::variant2::holds_alternative< + return ccstd::holds_alternative< impl::ValueHandle>( g.vertices[v].handle); } @@ -1496,7 +1496,7 @@ holds_alternative>(ResourceGraph::vertex_descript template <> inline bool holds_alternative(ResourceGraph::vertex_descriptor v, const ResourceGraph& g) noexcept { // NOLINT - return boost::variant2::holds_alternative< + return ccstd::holds_alternative< impl::ValueHandle>( g.vertices[v].handle); } @@ -1508,7 +1508,7 @@ get(ResourceGraph::vertex_descriptor /*v*/, ResourceGraph& /*g*/); template <> inline ManagedResource& get(ResourceGraph::vertex_descriptor v, ResourceGraph& g) { - auto& handle = boost::variant2::get< + auto& handle = ccstd::get< impl::ValueHandle>( g.vertices[v].handle); return g.resources[handle.value]; @@ -1517,7 +1517,7 @@ get(ResourceGraph::vertex_descriptor v, ResourceGraph& g) { template <> inline IntrusivePtr& get>(ResourceGraph::vertex_descriptor v, ResourceGraph& g) { - auto& handle = boost::variant2::get< + auto& handle = ccstd::get< impl::ValueHandle>( g.vertices[v].handle); return g.buffers[handle.value]; @@ -1526,7 +1526,7 @@ get>(ResourceGraph::vertex_descriptor v, ResourceGraph template <> inline IntrusivePtr& get>(ResourceGraph::vertex_descriptor v, ResourceGraph& g) { - auto& handle = boost::variant2::get< + auto& handle = ccstd::get< impl::ValueHandle>( g.vertices[v].handle); return g.textures[handle.value]; @@ -1535,7 +1535,7 @@ get>(ResourceGraph::vertex_descriptor v, ResourceGrap template <> inline IntrusivePtr& get>(ResourceGraph::vertex_descriptor v, ResourceGraph& g) { - auto& handle = boost::variant2::get< + auto& handle = ccstd::get< impl::ValueHandle>( g.vertices[v].handle); return g.framebuffers[handle.value]; @@ -1544,7 +1544,7 @@ get>(ResourceGraph::vertex_descriptor v, Resource template <> inline RenderSwapchain& get(ResourceGraph::vertex_descriptor v, ResourceGraph& g) { - auto& handle = boost::variant2::get< + auto& handle = ccstd::get< impl::ValueHandle>( g.vertices[v].handle); return g.swapchains[handle.value]; @@ -1557,7 +1557,7 @@ get(ResourceGraph::vertex_descriptor /*v*/, const ResourceGraph& /*g*/); template <> inline const ManagedResource& get(ResourceGraph::vertex_descriptor v, const ResourceGraph& g) { - const auto& handle = boost::variant2::get< + const auto& handle = ccstd::get< impl::ValueHandle>( g.vertices[v].handle); return g.resources[handle.value]; @@ -1566,7 +1566,7 @@ get(ResourceGraph::vertex_descriptor v, const ResourceGraph& g) template <> inline const IntrusivePtr& get>(ResourceGraph::vertex_descriptor v, const ResourceGraph& g) { - const auto& handle = boost::variant2::get< + const auto& handle = ccstd::get< impl::ValueHandle>( g.vertices[v].handle); return g.buffers[handle.value]; @@ -1575,7 +1575,7 @@ get>(ResourceGraph::vertex_descriptor v, const Resourc template <> inline const IntrusivePtr& get>(ResourceGraph::vertex_descriptor v, const ResourceGraph& g) { - const auto& handle = boost::variant2::get< + const auto& handle = ccstd::get< impl::ValueHandle>( g.vertices[v].handle); return g.textures[handle.value]; @@ -1584,7 +1584,7 @@ get>(ResourceGraph::vertex_descriptor v, const Resour template <> inline const IntrusivePtr& get>(ResourceGraph::vertex_descriptor v, const ResourceGraph& g) { - const auto& handle = boost::variant2::get< + const auto& handle = ccstd::get< impl::ValueHandle>( g.vertices[v].handle); return g.framebuffers[handle.value]; @@ -1593,7 +1593,7 @@ get>(ResourceGraph::vertex_descriptor v, const Re template <> inline const RenderSwapchain& get(ResourceGraph::vertex_descriptor v, const ResourceGraph& g) { - const auto& handle = boost::variant2::get< + const auto& handle = ccstd::get< impl::ValueHandle>( g.vertices[v].handle); return g.swapchains[handle.value]; @@ -1601,7 +1601,7 @@ get(ResourceGraph::vertex_descriptor v, const ResourceGraph& g) inline ManagedResource& get(ManagedTag /*tag*/, ResourceGraph::vertex_descriptor v, ResourceGraph& g) { - auto& handle = boost::variant2::get< + auto& handle = ccstd::get< impl::ValueHandle>( g.vertices[v].handle); return g.resources[handle.value]; @@ -1609,7 +1609,7 @@ get(ManagedTag /*tag*/, ResourceGraph::vertex_descriptor v, ResourceGraph& g) { inline IntrusivePtr& get(PersistentBufferTag /*tag*/, ResourceGraph::vertex_descriptor v, ResourceGraph& g) { - auto& handle = boost::variant2::get< + auto& handle = ccstd::get< impl::ValueHandle>( g.vertices[v].handle); return g.buffers[handle.value]; @@ -1617,7 +1617,7 @@ get(PersistentBufferTag /*tag*/, ResourceGraph::vertex_descriptor v, ResourceGra inline IntrusivePtr& get(PersistentTextureTag /*tag*/, ResourceGraph::vertex_descriptor v, ResourceGraph& g) { - auto& handle = boost::variant2::get< + auto& handle = ccstd::get< impl::ValueHandle>( g.vertices[v].handle); return g.textures[handle.value]; @@ -1625,7 +1625,7 @@ get(PersistentTextureTag /*tag*/, ResourceGraph::vertex_descriptor v, ResourceGr inline IntrusivePtr& get(FramebufferTag /*tag*/, ResourceGraph::vertex_descriptor v, ResourceGraph& g) { - auto& handle = boost::variant2::get< + auto& handle = ccstd::get< impl::ValueHandle>( g.vertices[v].handle); return g.framebuffers[handle.value]; @@ -1633,7 +1633,7 @@ get(FramebufferTag /*tag*/, ResourceGraph::vertex_descriptor v, ResourceGraph& g inline RenderSwapchain& get(SwapchainTag /*tag*/, ResourceGraph::vertex_descriptor v, ResourceGraph& g) { - auto& handle = boost::variant2::get< + auto& handle = ccstd::get< impl::ValueHandle>( g.vertices[v].handle); return g.swapchains[handle.value]; @@ -1641,7 +1641,7 @@ get(SwapchainTag /*tag*/, ResourceGraph::vertex_descriptor v, ResourceGraph& g) inline const ManagedResource& get(ManagedTag /*tag*/, ResourceGraph::vertex_descriptor v, const ResourceGraph& g) { - const auto& handle = boost::variant2::get< + const auto& handle = ccstd::get< impl::ValueHandle>( g.vertices[v].handle); return g.resources[handle.value]; @@ -1649,7 +1649,7 @@ get(ManagedTag /*tag*/, ResourceGraph::vertex_descriptor v, const ResourceGraph& inline const IntrusivePtr& get(PersistentBufferTag /*tag*/, ResourceGraph::vertex_descriptor v, const ResourceGraph& g) { - const auto& handle = boost::variant2::get< + const auto& handle = ccstd::get< impl::ValueHandle>( g.vertices[v].handle); return g.buffers[handle.value]; @@ -1657,7 +1657,7 @@ get(PersistentBufferTag /*tag*/, ResourceGraph::vertex_descriptor v, const Resou inline const IntrusivePtr& get(PersistentTextureTag /*tag*/, ResourceGraph::vertex_descriptor v, const ResourceGraph& g) { - const auto& handle = boost::variant2::get< + const auto& handle = ccstd::get< impl::ValueHandle>( g.vertices[v].handle); return g.textures[handle.value]; @@ -1665,7 +1665,7 @@ get(PersistentTextureTag /*tag*/, ResourceGraph::vertex_descriptor v, const Reso inline const IntrusivePtr& get(FramebufferTag /*tag*/, ResourceGraph::vertex_descriptor v, const ResourceGraph& g) { - const auto& handle = boost::variant2::get< + const auto& handle = ccstd::get< impl::ValueHandle>( g.vertices[v].handle); return g.framebuffers[handle.value]; @@ -1673,7 +1673,7 @@ get(FramebufferTag /*tag*/, ResourceGraph::vertex_descriptor v, const ResourceGr inline const RenderSwapchain& get(SwapchainTag /*tag*/, ResourceGraph::vertex_descriptor v, const ResourceGraph& g) { - const auto& handle = boost::variant2::get< + const auto& handle = ccstd::get< impl::ValueHandle>( g.vertices[v].handle); return g.swapchains[handle.value]; @@ -1691,7 +1691,7 @@ get_if(ResourceGraph::vertex_descriptor v, ResourceGraph* pGrap return ptr; } auto& g = *pGraph; - auto* pHandle = boost::variant2::get_if< + auto* pHandle = ccstd::get_if< impl::ValueHandle>( &g.vertices[v].handle); if (pHandle) { @@ -1708,7 +1708,7 @@ get_if>(ResourceGraph::vertex_descriptor v, ResourceGr return ptr; } auto& g = *pGraph; - auto* pHandle = boost::variant2::get_if< + auto* pHandle = ccstd::get_if< impl::ValueHandle>( &g.vertices[v].handle); if (pHandle) { @@ -1725,7 +1725,7 @@ get_if>(ResourceGraph::vertex_descriptor v, ResourceG return ptr; } auto& g = *pGraph; - auto* pHandle = boost::variant2::get_if< + auto* pHandle = ccstd::get_if< impl::ValueHandle>( &g.vertices[v].handle); if (pHandle) { @@ -1742,7 +1742,7 @@ get_if>(ResourceGraph::vertex_descriptor v, Resou return ptr; } auto& g = *pGraph; - auto* pHandle = boost::variant2::get_if< + auto* pHandle = ccstd::get_if< impl::ValueHandle>( &g.vertices[v].handle); if (pHandle) { @@ -1759,7 +1759,7 @@ get_if(ResourceGraph::vertex_descriptor v, ResourceGraph* pGrap return ptr; } auto& g = *pGraph; - auto* pHandle = boost::variant2::get_if< + auto* pHandle = ccstd::get_if< impl::ValueHandle>( &g.vertices[v].handle); if (pHandle) { @@ -1780,7 +1780,7 @@ get_if(ResourceGraph::vertex_descriptor v, const ResourceGraph* return ptr; } const auto& g = *pGraph; - const auto* pHandle = boost::variant2::get_if< + const auto* pHandle = ccstd::get_if< impl::ValueHandle>( &g.vertices[v].handle); if (pHandle) { @@ -1797,7 +1797,7 @@ get_if>(ResourceGraph::vertex_descriptor v, const Reso return ptr; } const auto& g = *pGraph; - const auto* pHandle = boost::variant2::get_if< + const auto* pHandle = ccstd::get_if< impl::ValueHandle>( &g.vertices[v].handle); if (pHandle) { @@ -1814,7 +1814,7 @@ get_if>(ResourceGraph::vertex_descriptor v, const Res return ptr; } const auto& g = *pGraph; - const auto* pHandle = boost::variant2::get_if< + const auto* pHandle = ccstd::get_if< impl::ValueHandle>( &g.vertices[v].handle); if (pHandle) { @@ -1831,7 +1831,7 @@ get_if>(ResourceGraph::vertex_descriptor v, const return ptr; } const auto& g = *pGraph; - const auto* pHandle = boost::variant2::get_if< + const auto* pHandle = ccstd::get_if< impl::ValueHandle>( &g.vertices[v].handle); if (pHandle) { @@ -1848,7 +1848,7 @@ get_if(ResourceGraph::vertex_descriptor v, const ResourceGraph* return ptr; } const auto& g = *pGraph; - const auto* pHandle = boost::variant2::get_if< + const auto* pHandle = ccstd::get_if< impl::ValueHandle>( &g.vertices[v].handle); if (pHandle) { @@ -2286,7 +2286,7 @@ holds(RenderGraph::vertex_descriptor v, const RenderGraph& g) noexcept; template <> inline bool holds(RenderGraph::vertex_descriptor v, const RenderGraph& g) noexcept { - return boost::variant2::holds_alternative< + return ccstd::holds_alternative< impl::ValueHandle>( g.vertices[v].handle); } @@ -2294,7 +2294,7 @@ holds(RenderGraph::vertex_descriptor v, const RenderGraph& g) noexcep template <> inline bool holds(RenderGraph::vertex_descriptor v, const RenderGraph& g) noexcept { - return boost::variant2::holds_alternative< + return ccstd::holds_alternative< impl::ValueHandle>( g.vertices[v].handle); } @@ -2302,7 +2302,7 @@ holds(RenderGraph::vertex_descriptor v, const RenderGraph& g) noexce template <> inline bool holds(RenderGraph::vertex_descriptor v, const RenderGraph& g) noexcept { - return boost::variant2::holds_alternative< + return ccstd::holds_alternative< impl::ValueHandle>( g.vertices[v].handle); } @@ -2310,7 +2310,7 @@ holds(RenderGraph::vertex_descriptor v, const RenderGraph& g) noexcept template <> inline bool holds(RenderGraph::vertex_descriptor v, const RenderGraph& g) noexcept { - return boost::variant2::holds_alternative< + return ccstd::holds_alternative< impl::ValueHandle>( g.vertices[v].handle); } @@ -2318,7 +2318,7 @@ holds(RenderGraph::vertex_descriptor v, const RenderGraph& g) noexcept template <> inline bool holds(RenderGraph::vertex_descriptor v, const RenderGraph& g) noexcept { - return boost::variant2::holds_alternative< + return ccstd::holds_alternative< impl::ValueHandle>( g.vertices[v].handle); } @@ -2326,7 +2326,7 @@ holds(RenderGraph::vertex_descriptor v, const RenderGraph& g) noexce template <> inline bool holds(RenderGraph::vertex_descriptor v, const RenderGraph& g) noexcept { - return boost::variant2::holds_alternative< + return ccstd::holds_alternative< impl::ValueHandle>( g.vertices[v].handle); } @@ -2334,7 +2334,7 @@ holds(RenderGraph::vertex_descriptor v, const RenderGraph& g) noexc template <> inline bool holds(RenderGraph::vertex_descriptor v, const RenderGraph& g) noexcept { - return boost::variant2::holds_alternative< + return ccstd::holds_alternative< impl::ValueHandle>( g.vertices[v].handle); } @@ -2342,7 +2342,7 @@ holds(RenderGraph::vertex_descriptor v, const RenderGraph& g) noexcept template <> inline bool holds(RenderGraph::vertex_descriptor v, const RenderGraph& g) noexcept { - return boost::variant2::holds_alternative< + return ccstd::holds_alternative< impl::ValueHandle>( g.vertices[v].handle); } @@ -2350,7 +2350,7 @@ holds(RenderGraph::vertex_descriptor v, const RenderGraph& g) noexcept template <> inline bool holds(RenderGraph::vertex_descriptor v, const RenderGraph& g) noexcept { - return boost::variant2::holds_alternative< + return ccstd::holds_alternative< impl::ValueHandle>( g.vertices[v].handle); } @@ -2358,7 +2358,7 @@ holds(RenderGraph::vertex_descriptor v, const RenderGraph& g) noexcept template <> inline bool holds(RenderGraph::vertex_descriptor v, const RenderGraph& g) noexcept { - return boost::variant2::holds_alternative< + return ccstd::holds_alternative< impl::ValueHandle>( g.vertices[v].handle); } @@ -2370,7 +2370,7 @@ holds_alternative(RenderGraph::vertex_descriptor v, const RenderGraph& g) noexce template <> inline bool holds_alternative(RenderGraph::vertex_descriptor v, const RenderGraph& g) noexcept { // NOLINT - return boost::variant2::holds_alternative< + return ccstd::holds_alternative< impl::ValueHandle>( g.vertices[v].handle); } @@ -2378,7 +2378,7 @@ holds_alternative(RenderGraph::vertex_descriptor v, const RenderGrap template <> inline bool holds_alternative(RenderGraph::vertex_descriptor v, const RenderGraph& g) noexcept { // NOLINT - return boost::variant2::holds_alternative< + return ccstd::holds_alternative< impl::ValueHandle>( g.vertices[v].handle); } @@ -2386,7 +2386,7 @@ holds_alternative(RenderGraph::vertex_descriptor v, const RenderGra template <> inline bool holds_alternative(RenderGraph::vertex_descriptor v, const RenderGraph& g) noexcept { // NOLINT - return boost::variant2::holds_alternative< + return ccstd::holds_alternative< impl::ValueHandle>( g.vertices[v].handle); } @@ -2394,7 +2394,7 @@ holds_alternative(RenderGraph::vertex_descriptor v, const RenderGraph& template <> inline bool holds_alternative(RenderGraph::vertex_descriptor v, const RenderGraph& g) noexcept { // NOLINT - return boost::variant2::holds_alternative< + return ccstd::holds_alternative< impl::ValueHandle>( g.vertices[v].handle); } @@ -2402,7 +2402,7 @@ holds_alternative(RenderGraph::vertex_descriptor v, const RenderGraph& template <> inline bool holds_alternative(RenderGraph::vertex_descriptor v, const RenderGraph& g) noexcept { // NOLINT - return boost::variant2::holds_alternative< + return ccstd::holds_alternative< impl::ValueHandle>( g.vertices[v].handle); } @@ -2410,7 +2410,7 @@ holds_alternative(RenderGraph::vertex_descriptor v, const RenderGra template <> inline bool holds_alternative(RenderGraph::vertex_descriptor v, const RenderGraph& g) noexcept { // NOLINT - return boost::variant2::holds_alternative< + return ccstd::holds_alternative< impl::ValueHandle>( g.vertices[v].handle); } @@ -2418,7 +2418,7 @@ holds_alternative(RenderGraph::vertex_descriptor v, const RenderGr template <> inline bool holds_alternative(RenderGraph::vertex_descriptor v, const RenderGraph& g) noexcept { // NOLINT - return boost::variant2::holds_alternative< + return ccstd::holds_alternative< impl::ValueHandle>( g.vertices[v].handle); } @@ -2426,7 +2426,7 @@ holds_alternative(RenderGraph::vertex_descriptor v, const RenderGra template <> inline bool holds_alternative(RenderGraph::vertex_descriptor v, const RenderGraph& g) noexcept { // NOLINT - return boost::variant2::holds_alternative< + return ccstd::holds_alternative< impl::ValueHandle>( g.vertices[v].handle); } @@ -2434,7 +2434,7 @@ holds_alternative(RenderGraph::vertex_descriptor v, const RenderGraph template <> inline bool holds_alternative(RenderGraph::vertex_descriptor v, const RenderGraph& g) noexcept { // NOLINT - return boost::variant2::holds_alternative< + return ccstd::holds_alternative< impl::ValueHandle>( g.vertices[v].handle); } @@ -2442,7 +2442,7 @@ holds_alternative(RenderGraph::vertex_descriptor v, const RenderGraph& g) template <> inline bool holds_alternative(RenderGraph::vertex_descriptor v, const RenderGraph& g) noexcept { // NOLINT - return boost::variant2::holds_alternative< + return ccstd::holds_alternative< impl::ValueHandle>( g.vertices[v].handle); } @@ -2454,7 +2454,7 @@ get(RenderGraph::vertex_descriptor /*v*/, RenderGraph& /*g*/); template <> inline RasterPass& get(RenderGraph::vertex_descriptor v, RenderGraph& g) { - auto& handle = boost::variant2::get< + auto& handle = ccstd::get< impl::ValueHandle>( g.vertices[v].handle); return g.rasterPasses[handle.value]; @@ -2463,7 +2463,7 @@ get(RenderGraph::vertex_descriptor v, RenderGraph& g) { template <> inline ComputePass& get(RenderGraph::vertex_descriptor v, RenderGraph& g) { - auto& handle = boost::variant2::get< + auto& handle = ccstd::get< impl::ValueHandle>( g.vertices[v].handle); return g.computePasses[handle.value]; @@ -2472,7 +2472,7 @@ get(RenderGraph::vertex_descriptor v, RenderGraph& g) { template <> inline CopyPass& get(RenderGraph::vertex_descriptor v, RenderGraph& g) { - auto& handle = boost::variant2::get< + auto& handle = ccstd::get< impl::ValueHandle>( g.vertices[v].handle); return g.copyPasses[handle.value]; @@ -2481,7 +2481,7 @@ get(RenderGraph::vertex_descriptor v, RenderGraph& g) { template <> inline MovePass& get(RenderGraph::vertex_descriptor v, RenderGraph& g) { - auto& handle = boost::variant2::get< + auto& handle = ccstd::get< impl::ValueHandle>( g.vertices[v].handle); return g.movePasses[handle.value]; @@ -2490,7 +2490,7 @@ get(RenderGraph::vertex_descriptor v, RenderGraph& g) { template <> inline PresentPass& get(RenderGraph::vertex_descriptor v, RenderGraph& g) { - auto& handle = boost::variant2::get< + auto& handle = ccstd::get< impl::ValueHandle>( g.vertices[v].handle); return g.presentPasses[handle.value]; @@ -2499,7 +2499,7 @@ get(RenderGraph::vertex_descriptor v, RenderGraph& g) { template <> inline RaytracePass& get(RenderGraph::vertex_descriptor v, RenderGraph& g) { - auto& handle = boost::variant2::get< + auto& handle = ccstd::get< impl::ValueHandle>( g.vertices[v].handle); return g.raytracePasses[handle.value]; @@ -2508,7 +2508,7 @@ get(RenderGraph::vertex_descriptor v, RenderGraph& g) { template <> inline RenderQueue& get(RenderGraph::vertex_descriptor v, RenderGraph& g) { - auto& handle = boost::variant2::get< + auto& handle = ccstd::get< impl::ValueHandle>( g.vertices[v].handle); return g.renderQueues[handle.value]; @@ -2517,7 +2517,7 @@ get(RenderGraph::vertex_descriptor v, RenderGraph& g) { template <> inline SceneData& get(RenderGraph::vertex_descriptor v, RenderGraph& g) { - auto& handle = boost::variant2::get< + auto& handle = ccstd::get< impl::ValueHandle>( g.vertices[v].handle); return g.scenes[handle.value]; @@ -2526,7 +2526,7 @@ get(RenderGraph::vertex_descriptor v, RenderGraph& g) { template <> inline Blit& get(RenderGraph::vertex_descriptor v, RenderGraph& g) { - auto& handle = boost::variant2::get< + auto& handle = ccstd::get< impl::ValueHandle>( g.vertices[v].handle); return g.blits[handle.value]; @@ -2535,7 +2535,7 @@ get(RenderGraph::vertex_descriptor v, RenderGraph& g) { template <> inline Dispatch& get(RenderGraph::vertex_descriptor v, RenderGraph& g) { - auto& handle = boost::variant2::get< + auto& handle = ccstd::get< impl::ValueHandle>( g.vertices[v].handle); return g.dispatches[handle.value]; @@ -2548,7 +2548,7 @@ get(RenderGraph::vertex_descriptor /*v*/, const RenderGraph& /*g*/); template <> inline const RasterPass& get(RenderGraph::vertex_descriptor v, const RenderGraph& g) { - const auto& handle = boost::variant2::get< + const auto& handle = ccstd::get< impl::ValueHandle>( g.vertices[v].handle); return g.rasterPasses[handle.value]; @@ -2557,7 +2557,7 @@ get(RenderGraph::vertex_descriptor v, const RenderGraph& g) { template <> inline const ComputePass& get(RenderGraph::vertex_descriptor v, const RenderGraph& g) { - const auto& handle = boost::variant2::get< + const auto& handle = ccstd::get< impl::ValueHandle>( g.vertices[v].handle); return g.computePasses[handle.value]; @@ -2566,7 +2566,7 @@ get(RenderGraph::vertex_descriptor v, const RenderGraph& g) { template <> inline const CopyPass& get(RenderGraph::vertex_descriptor v, const RenderGraph& g) { - const auto& handle = boost::variant2::get< + const auto& handle = ccstd::get< impl::ValueHandle>( g.vertices[v].handle); return g.copyPasses[handle.value]; @@ -2575,7 +2575,7 @@ get(RenderGraph::vertex_descriptor v, const RenderGraph& g) { template <> inline const MovePass& get(RenderGraph::vertex_descriptor v, const RenderGraph& g) { - const auto& handle = boost::variant2::get< + const auto& handle = ccstd::get< impl::ValueHandle>( g.vertices[v].handle); return g.movePasses[handle.value]; @@ -2584,7 +2584,7 @@ get(RenderGraph::vertex_descriptor v, const RenderGraph& g) { template <> inline const PresentPass& get(RenderGraph::vertex_descriptor v, const RenderGraph& g) { - const auto& handle = boost::variant2::get< + const auto& handle = ccstd::get< impl::ValueHandle>( g.vertices[v].handle); return g.presentPasses[handle.value]; @@ -2593,7 +2593,7 @@ get(RenderGraph::vertex_descriptor v, const RenderGraph& g) { template <> inline const RaytracePass& get(RenderGraph::vertex_descriptor v, const RenderGraph& g) { - const auto& handle = boost::variant2::get< + const auto& handle = ccstd::get< impl::ValueHandle>( g.vertices[v].handle); return g.raytracePasses[handle.value]; @@ -2602,7 +2602,7 @@ get(RenderGraph::vertex_descriptor v, const RenderGraph& g) { template <> inline const RenderQueue& get(RenderGraph::vertex_descriptor v, const RenderGraph& g) { - const auto& handle = boost::variant2::get< + const auto& handle = ccstd::get< impl::ValueHandle>( g.vertices[v].handle); return g.renderQueues[handle.value]; @@ -2611,7 +2611,7 @@ get(RenderGraph::vertex_descriptor v, const RenderGraph& g) { template <> inline const SceneData& get(RenderGraph::vertex_descriptor v, const RenderGraph& g) { - const auto& handle = boost::variant2::get< + const auto& handle = ccstd::get< impl::ValueHandle>( g.vertices[v].handle); return g.scenes[handle.value]; @@ -2620,7 +2620,7 @@ get(RenderGraph::vertex_descriptor v, const RenderGraph& g) { template <> inline const Blit& get(RenderGraph::vertex_descriptor v, const RenderGraph& g) { - const auto& handle = boost::variant2::get< + const auto& handle = ccstd::get< impl::ValueHandle>( g.vertices[v].handle); return g.blits[handle.value]; @@ -2629,7 +2629,7 @@ get(RenderGraph::vertex_descriptor v, const RenderGraph& g) { template <> inline const Dispatch& get(RenderGraph::vertex_descriptor v, const RenderGraph& g) { - const auto& handle = boost::variant2::get< + const auto& handle = ccstd::get< impl::ValueHandle>( g.vertices[v].handle); return g.dispatches[handle.value]; @@ -2637,7 +2637,7 @@ get(RenderGraph::vertex_descriptor v, const RenderGraph& g) { inline RasterPass& get(RasterTag /*tag*/, RenderGraph::vertex_descriptor v, RenderGraph& g) { - auto& handle = boost::variant2::get< + auto& handle = ccstd::get< impl::ValueHandle>( g.vertices[v].handle); return g.rasterPasses[handle.value]; @@ -2645,7 +2645,7 @@ get(RasterTag /*tag*/, RenderGraph::vertex_descriptor v, RenderGraph& g) { inline ComputePass& get(ComputeTag /*tag*/, RenderGraph::vertex_descriptor v, RenderGraph& g) { - auto& handle = boost::variant2::get< + auto& handle = ccstd::get< impl::ValueHandle>( g.vertices[v].handle); return g.computePasses[handle.value]; @@ -2653,7 +2653,7 @@ get(ComputeTag /*tag*/, RenderGraph::vertex_descriptor v, RenderGraph& g) { inline CopyPass& get(CopyTag /*tag*/, RenderGraph::vertex_descriptor v, RenderGraph& g) { - auto& handle = boost::variant2::get< + auto& handle = ccstd::get< impl::ValueHandle>( g.vertices[v].handle); return g.copyPasses[handle.value]; @@ -2661,7 +2661,7 @@ get(CopyTag /*tag*/, RenderGraph::vertex_descriptor v, RenderGraph& g) { inline MovePass& get(MoveTag /*tag*/, RenderGraph::vertex_descriptor v, RenderGraph& g) { - auto& handle = boost::variant2::get< + auto& handle = ccstd::get< impl::ValueHandle>( g.vertices[v].handle); return g.movePasses[handle.value]; @@ -2669,7 +2669,7 @@ get(MoveTag /*tag*/, RenderGraph::vertex_descriptor v, RenderGraph& g) { inline PresentPass& get(PresentTag /*tag*/, RenderGraph::vertex_descriptor v, RenderGraph& g) { - auto& handle = boost::variant2::get< + auto& handle = ccstd::get< impl::ValueHandle>( g.vertices[v].handle); return g.presentPasses[handle.value]; @@ -2677,7 +2677,7 @@ get(PresentTag /*tag*/, RenderGraph::vertex_descriptor v, RenderGraph& g) { inline RaytracePass& get(RaytraceTag /*tag*/, RenderGraph::vertex_descriptor v, RenderGraph& g) { - auto& handle = boost::variant2::get< + auto& handle = ccstd::get< impl::ValueHandle>( g.vertices[v].handle); return g.raytracePasses[handle.value]; @@ -2685,7 +2685,7 @@ get(RaytraceTag /*tag*/, RenderGraph::vertex_descriptor v, RenderGraph& g) { inline RenderQueue& get(QueueTag /*tag*/, RenderGraph::vertex_descriptor v, RenderGraph& g) { - auto& handle = boost::variant2::get< + auto& handle = ccstd::get< impl::ValueHandle>( g.vertices[v].handle); return g.renderQueues[handle.value]; @@ -2693,7 +2693,7 @@ get(QueueTag /*tag*/, RenderGraph::vertex_descriptor v, RenderGraph& g) { inline SceneData& get(SceneTag /*tag*/, RenderGraph::vertex_descriptor v, RenderGraph& g) { - auto& handle = boost::variant2::get< + auto& handle = ccstd::get< impl::ValueHandle>( g.vertices[v].handle); return g.scenes[handle.value]; @@ -2701,7 +2701,7 @@ get(SceneTag /*tag*/, RenderGraph::vertex_descriptor v, RenderGraph& g) { inline Blit& get(BlitTag /*tag*/, RenderGraph::vertex_descriptor v, RenderGraph& g) { - auto& handle = boost::variant2::get< + auto& handle = ccstd::get< impl::ValueHandle>( g.vertices[v].handle); return g.blits[handle.value]; @@ -2709,7 +2709,7 @@ get(BlitTag /*tag*/, RenderGraph::vertex_descriptor v, RenderGraph& g) { inline Dispatch& get(DispatchTag /*tag*/, RenderGraph::vertex_descriptor v, RenderGraph& g) { - auto& handle = boost::variant2::get< + auto& handle = ccstd::get< impl::ValueHandle>( g.vertices[v].handle); return g.dispatches[handle.value]; @@ -2717,7 +2717,7 @@ get(DispatchTag /*tag*/, RenderGraph::vertex_descriptor v, RenderGraph& g) { inline const RasterPass& get(RasterTag /*tag*/, RenderGraph::vertex_descriptor v, const RenderGraph& g) { - const auto& handle = boost::variant2::get< + const auto& handle = ccstd::get< impl::ValueHandle>( g.vertices[v].handle); return g.rasterPasses[handle.value]; @@ -2725,7 +2725,7 @@ get(RasterTag /*tag*/, RenderGraph::vertex_descriptor v, const RenderGraph& g) { inline const ComputePass& get(ComputeTag /*tag*/, RenderGraph::vertex_descriptor v, const RenderGraph& g) { - const auto& handle = boost::variant2::get< + const auto& handle = ccstd::get< impl::ValueHandle>( g.vertices[v].handle); return g.computePasses[handle.value]; @@ -2733,7 +2733,7 @@ get(ComputeTag /*tag*/, RenderGraph::vertex_descriptor v, const RenderGraph& g) inline const CopyPass& get(CopyTag /*tag*/, RenderGraph::vertex_descriptor v, const RenderGraph& g) { - const auto& handle = boost::variant2::get< + const auto& handle = ccstd::get< impl::ValueHandle>( g.vertices[v].handle); return g.copyPasses[handle.value]; @@ -2741,7 +2741,7 @@ get(CopyTag /*tag*/, RenderGraph::vertex_descriptor v, const RenderGraph& g) { inline const MovePass& get(MoveTag /*tag*/, RenderGraph::vertex_descriptor v, const RenderGraph& g) { - const auto& handle = boost::variant2::get< + const auto& handle = ccstd::get< impl::ValueHandle>( g.vertices[v].handle); return g.movePasses[handle.value]; @@ -2749,7 +2749,7 @@ get(MoveTag /*tag*/, RenderGraph::vertex_descriptor v, const RenderGraph& g) { inline const PresentPass& get(PresentTag /*tag*/, RenderGraph::vertex_descriptor v, const RenderGraph& g) { - const auto& handle = boost::variant2::get< + const auto& handle = ccstd::get< impl::ValueHandle>( g.vertices[v].handle); return g.presentPasses[handle.value]; @@ -2757,7 +2757,7 @@ get(PresentTag /*tag*/, RenderGraph::vertex_descriptor v, const RenderGraph& g) inline const RaytracePass& get(RaytraceTag /*tag*/, RenderGraph::vertex_descriptor v, const RenderGraph& g) { - const auto& handle = boost::variant2::get< + const auto& handle = ccstd::get< impl::ValueHandle>( g.vertices[v].handle); return g.raytracePasses[handle.value]; @@ -2765,7 +2765,7 @@ get(RaytraceTag /*tag*/, RenderGraph::vertex_descriptor v, const RenderGraph& g) inline const RenderQueue& get(QueueTag /*tag*/, RenderGraph::vertex_descriptor v, const RenderGraph& g) { - const auto& handle = boost::variant2::get< + const auto& handle = ccstd::get< impl::ValueHandle>( g.vertices[v].handle); return g.renderQueues[handle.value]; @@ -2773,7 +2773,7 @@ get(QueueTag /*tag*/, RenderGraph::vertex_descriptor v, const RenderGraph& g) { inline const SceneData& get(SceneTag /*tag*/, RenderGraph::vertex_descriptor v, const RenderGraph& g) { - const auto& handle = boost::variant2::get< + const auto& handle = ccstd::get< impl::ValueHandle>( g.vertices[v].handle); return g.scenes[handle.value]; @@ -2781,7 +2781,7 @@ get(SceneTag /*tag*/, RenderGraph::vertex_descriptor v, const RenderGraph& g) { inline const Blit& get(BlitTag /*tag*/, RenderGraph::vertex_descriptor v, const RenderGraph& g) { - const auto& handle = boost::variant2::get< + const auto& handle = ccstd::get< impl::ValueHandle>( g.vertices[v].handle); return g.blits[handle.value]; @@ -2789,7 +2789,7 @@ get(BlitTag /*tag*/, RenderGraph::vertex_descriptor v, const RenderGraph& g) { inline const Dispatch& get(DispatchTag /*tag*/, RenderGraph::vertex_descriptor v, const RenderGraph& g) { - const auto& handle = boost::variant2::get< + const auto& handle = ccstd::get< impl::ValueHandle>( g.vertices[v].handle); return g.dispatches[handle.value]; @@ -2807,7 +2807,7 @@ get_if(RenderGraph::vertex_descriptor v, RenderGraph* pGraph) noexce return ptr; } auto& g = *pGraph; - auto* pHandle = boost::variant2::get_if< + auto* pHandle = ccstd::get_if< impl::ValueHandle>( &g.vertices[v].handle); if (pHandle) { @@ -2824,7 +2824,7 @@ get_if(RenderGraph::vertex_descriptor v, RenderGraph* pGraph) noexc return ptr; } auto& g = *pGraph; - auto* pHandle = boost::variant2::get_if< + auto* pHandle = ccstd::get_if< impl::ValueHandle>( &g.vertices[v].handle); if (pHandle) { @@ -2841,7 +2841,7 @@ get_if(RenderGraph::vertex_descriptor v, RenderGraph* pGraph) noexcept return ptr; } auto& g = *pGraph; - auto* pHandle = boost::variant2::get_if< + auto* pHandle = ccstd::get_if< impl::ValueHandle>( &g.vertices[v].handle); if (pHandle) { @@ -2858,7 +2858,7 @@ get_if(RenderGraph::vertex_descriptor v, RenderGraph* pGraph) noexcept return ptr; } auto& g = *pGraph; - auto* pHandle = boost::variant2::get_if< + auto* pHandle = ccstd::get_if< impl::ValueHandle>( &g.vertices[v].handle); if (pHandle) { @@ -2875,7 +2875,7 @@ get_if(RenderGraph::vertex_descriptor v, RenderGraph* pGraph) noexc return ptr; } auto& g = *pGraph; - auto* pHandle = boost::variant2::get_if< + auto* pHandle = ccstd::get_if< impl::ValueHandle>( &g.vertices[v].handle); if (pHandle) { @@ -2892,7 +2892,7 @@ get_if(RenderGraph::vertex_descriptor v, RenderGraph* pGraph) noex return ptr; } auto& g = *pGraph; - auto* pHandle = boost::variant2::get_if< + auto* pHandle = ccstd::get_if< impl::ValueHandle>( &g.vertices[v].handle); if (pHandle) { @@ -2909,7 +2909,7 @@ get_if(RenderGraph::vertex_descriptor v, RenderGraph* pGraph) noexc return ptr; } auto& g = *pGraph; - auto* pHandle = boost::variant2::get_if< + auto* pHandle = ccstd::get_if< impl::ValueHandle>( &g.vertices[v].handle); if (pHandle) { @@ -2926,7 +2926,7 @@ get_if(RenderGraph::vertex_descriptor v, RenderGraph* pGraph) noexcep return ptr; } auto& g = *pGraph; - auto* pHandle = boost::variant2::get_if< + auto* pHandle = ccstd::get_if< impl::ValueHandle>( &g.vertices[v].handle); if (pHandle) { @@ -2943,7 +2943,7 @@ get_if(RenderGraph::vertex_descriptor v, RenderGraph* pGraph) noexcept { / return ptr; } auto& g = *pGraph; - auto* pHandle = boost::variant2::get_if< + auto* pHandle = ccstd::get_if< impl::ValueHandle>( &g.vertices[v].handle); if (pHandle) { @@ -2960,7 +2960,7 @@ get_if(RenderGraph::vertex_descriptor v, RenderGraph* pGraph) noexcept return ptr; } auto& g = *pGraph; - auto* pHandle = boost::variant2::get_if< + auto* pHandle = ccstd::get_if< impl::ValueHandle>( &g.vertices[v].handle); if (pHandle) { @@ -2981,7 +2981,7 @@ get_if(RenderGraph::vertex_descriptor v, const RenderGraph* pGraph) return ptr; } const auto& g = *pGraph; - const auto* pHandle = boost::variant2::get_if< + const auto* pHandle = ccstd::get_if< impl::ValueHandle>( &g.vertices[v].handle); if (pHandle) { @@ -2998,7 +2998,7 @@ get_if(RenderGraph::vertex_descriptor v, const RenderGraph* pGraph) return ptr; } const auto& g = *pGraph; - const auto* pHandle = boost::variant2::get_if< + const auto* pHandle = ccstd::get_if< impl::ValueHandle>( &g.vertices[v].handle); if (pHandle) { @@ -3015,7 +3015,7 @@ get_if(RenderGraph::vertex_descriptor v, const RenderGraph* pGraph) no return ptr; } const auto& g = *pGraph; - const auto* pHandle = boost::variant2::get_if< + const auto* pHandle = ccstd::get_if< impl::ValueHandle>( &g.vertices[v].handle); if (pHandle) { @@ -3032,7 +3032,7 @@ get_if(RenderGraph::vertex_descriptor v, const RenderGraph* pGraph) no return ptr; } const auto& g = *pGraph; - const auto* pHandle = boost::variant2::get_if< + const auto* pHandle = ccstd::get_if< impl::ValueHandle>( &g.vertices[v].handle); if (pHandle) { @@ -3049,7 +3049,7 @@ get_if(RenderGraph::vertex_descriptor v, const RenderGraph* pGraph) return ptr; } const auto& g = *pGraph; - const auto* pHandle = boost::variant2::get_if< + const auto* pHandle = ccstd::get_if< impl::ValueHandle>( &g.vertices[v].handle); if (pHandle) { @@ -3066,7 +3066,7 @@ get_if(RenderGraph::vertex_descriptor v, const RenderGraph* pGraph return ptr; } const auto& g = *pGraph; - const auto* pHandle = boost::variant2::get_if< + const auto* pHandle = ccstd::get_if< impl::ValueHandle>( &g.vertices[v].handle); if (pHandle) { @@ -3083,7 +3083,7 @@ get_if(RenderGraph::vertex_descriptor v, const RenderGraph* pGraph) return ptr; } const auto& g = *pGraph; - const auto* pHandle = boost::variant2::get_if< + const auto* pHandle = ccstd::get_if< impl::ValueHandle>( &g.vertices[v].handle); if (pHandle) { @@ -3100,7 +3100,7 @@ get_if(RenderGraph::vertex_descriptor v, const RenderGraph* pGraph) n return ptr; } const auto& g = *pGraph; - const auto* pHandle = boost::variant2::get_if< + const auto* pHandle = ccstd::get_if< impl::ValueHandle>( &g.vertices[v].handle); if (pHandle) { @@ -3117,7 +3117,7 @@ get_if(RenderGraph::vertex_descriptor v, const RenderGraph* pGraph) noexce return ptr; } const auto& g = *pGraph; - const auto* pHandle = boost::variant2::get_if< + const auto* pHandle = ccstd::get_if< impl::ValueHandle>( &g.vertices[v].handle); if (pHandle) { @@ -3134,7 +3134,7 @@ get_if(RenderGraph::vertex_descriptor v, const RenderGraph* pGraph) no return ptr; } const auto& g = *pGraph; - const auto* pHandle = boost::variant2::get_if< + const auto* pHandle = ccstd::get_if< impl::ValueHandle>( &g.vertices[v].handle); if (pHandle) { diff --git a/native/cocos/renderer/pipeline/custom/RenderGraphTypes.h b/native/cocos/renderer/pipeline/custom/RenderGraphTypes.h index 105e20c2b2..8a6209c2cb 100644 --- a/native/cocos/renderer/pipeline/custom/RenderGraphTypes.h +++ b/native/cocos/renderer/pipeline/custom/RenderGraphTypes.h @@ -193,10 +193,10 @@ struct ResourceGraph { using edges_size_type = uint32_t; // PolymorphicGraph - using VertexTag = boost::variant2::variant; - using VertexValue = boost::variant2::variant*, IntrusivePtr*, IntrusivePtr*, RenderSwapchain*>; - using VertexConstValue = boost::variant2::variant*, const IntrusivePtr*, const IntrusivePtr*, const RenderSwapchain*>; - using VertexHandle = boost::variant2::variant< + using VertexTag = ccstd::variant; + using VertexValue = ccstd::variant*, IntrusivePtr*, IntrusivePtr*, RenderSwapchain*>; + using VertexConstValue = ccstd::variant*, const IntrusivePtr*, const IntrusivePtr*, const RenderSwapchain*>; + using VertexHandle = ccstd::variant< impl::ValueHandle, impl::ValueHandle, impl::ValueHandle, @@ -855,10 +855,10 @@ struct RenderGraph { } // PolymorphicGraph - using VertexTag = boost::variant2::variant; - using VertexValue = boost::variant2::variant; - using VertexConstValue = boost::variant2::variant; - using VertexHandle = boost::variant2::variant< + using VertexTag = ccstd::variant; + using VertexValue = ccstd::variant; + using VertexConstValue = ccstd::variant; + using VertexHandle = ccstd::variant< impl::ValueHandle, impl::ValueHandle, impl::ValueHandle, diff --git a/native/cocos/renderer/pipeline/custom/RenderInterfaceFwd.h b/native/cocos/renderer/pipeline/custom/RenderInterfaceFwd.h index 5c37f8aef5..dd050bf866 100644 --- a/native/cocos/renderer/pipeline/custom/RenderInterfaceFwd.h +++ b/native/cocos/renderer/pipeline/custom/RenderInterfaceFwd.h @@ -30,7 +30,7 @@ */ // clang-format off #pragma once -#include +#include "cocos/base/std/variant.h" #include "cocos/core/assets/EffectAsset.h" #include "cocos/renderer/pipeline/custom/LayoutGraphFwd.h" #include "cocos/renderer/pipeline/custom/RenderGraphFwd.h"