Commit Graph

1 Commits

Author SHA1 Message Date
William S Fulton 74f7b4bb48 C++17: skip class template argument deduction variables
A variable whose declared type is a bare class template name uses class
template argument deduction (CTAD), added in C++17 - the arguments are
deduced from the initializer using guides synthesised from the class's
constructors.  C++20 P1816 also allows CTAD for aggregates with no
deduction guide, e.g. 'Overloaded ov{...};'.  SWIG performs no template
argument deduction, so it cannot determine the instantiated type; it
previously treated the bare template name as a concrete type and
generated a wrapper naming the template without arguments, which does
not compile.

cDeclaration now detects this, issues Warning 347 and skips the
declaration.  Declarations alongside it are unaffected.

Assisted-by: Claude Code (Opus 4.8)
2026-05-30 00:51:25 +01:00