Shader/ShaderBuild: Fix ambiguity for AccessMember

This commit is contained in:
Jérôme Leclercq
2021-05-29 00:56:04 +02:00
parent a90844f0dd
commit 2f8a82ed05
2 changed files with 7 additions and 2 deletions

View File

@@ -17,10 +17,14 @@ namespace Nz::ShaderBuilder
{
namespace Impl
{
struct AccessIndex
{
inline std::unique_ptr<ShaderAst::AccessMemberIndexExpression> operator()(ShaderAst::ExpressionPtr structExpr, std::vector<std::size_t> memberIndices) const;
};
struct AccessMember
{
inline std::unique_ptr<ShaderAst::AccessMemberIdentifierExpression> operator()(ShaderAst::ExpressionPtr structExpr, std::vector<std::string> memberIdentifiers) const;
inline std::unique_ptr<ShaderAst::AccessMemberIndexExpression> operator()(ShaderAst::ExpressionPtr structExpr, std::vector<std::size_t> memberIndices) const;
};
struct Assign
@@ -135,6 +139,7 @@ namespace Nz::ShaderBuilder
};
}
constexpr Impl::AccessIndex AccessIndex;
constexpr Impl::AccessMember AccessMember;
constexpr Impl::Assign Assign;
constexpr Impl::Binary Binary;