From 577376d181a06ae2d053b503b95e5d7ea571c638 Mon Sep 17 00:00:00 2001 From: Thomas Lively Date: Thu, 13 Oct 2022 15:35:18 -0500 Subject: [NFC] Add an explicit deduction guide for `WithPosition` (#5140) Since our usage of `WithPosition` depends on C++17 class template argument deduction, it triggers a clang warning `-Wctad-maybe-unsupported`. Silence the warning by providing an explicit deduction guide. --- src/wasm/wat-parser.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/wasm/wat-parser.cpp') diff --git a/src/wasm/wat-parser.cpp b/src/wasm/wat-parser.cpp index bba751c71..23961ac3f 100644 --- a/src/wasm/wat-parser.cpp +++ b/src/wasm/wat-parser.cpp @@ -325,6 +325,9 @@ template struct WithPosition { ~WithPosition() { ctx.in.lexer.setIndex(original); } }; +// Deduction guide to satisfy -Wctad-maybe-unsupported. +template WithPosition(Ctx& ctx, Index) -> WithPosition; + using IndexMap = std::unordered_map; void applyImportNames(Importable& item, -- cgit v1.2.3