From af93434115800f5b7d85eb81cb774db287f1b3b7 Mon Sep 17 00:00:00 2001 From: Thomas Lively Date: Thu, 9 Nov 2023 23:27:03 +0100 Subject: [NFC] Add explicit deduction guides for CTAD (#6094) Class template argument deduction (CTAD) is a C++17 feature that allows variables to be declared with class template types without specifying the template parameters. Deduction guides are a mechanism by which template authors can control how the template parameters are inferred when CTAD is used. The Google style guide prohibits the use of CTAD except where template authors opt in to supporting it by providing explicit deduction guides. For compatibility with users adhering to Google style, set the compiler flag to check this condition and add the necessary deduction guides to make the compiler happy again. --- src/analysis/lattices/inverted.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/analysis/lattices/inverted.h') diff --git a/src/analysis/lattices/inverted.h b/src/analysis/lattices/inverted.h index 22e326742..b70e58968 100644 --- a/src/analysis/lattices/inverted.h +++ b/src/analysis/lattices/inverted.h @@ -49,6 +49,9 @@ template struct Inverted { } }; +// Deduction guide. +template Inverted(L&&) -> Inverted; + #if __cplusplus >= 202002L static_assert(Lattice>); #endif -- cgit v1.2.3