From bb368628722f49c1b9e1f00ae3628b821724356d Mon Sep 17 00:00:00 2001
From: Kris Thielemans
Date: Sun, 6 Mar 2022 17:34:26 +0000
Subject: [PATCH] add doc on %attribute and templates (#2224)
Document behaviour found in #2142
---
Doc/Manual/Library.html | 23 ++++++++++++++++++++++-
1 file changed, 22 insertions(+), 1 deletion(-)
diff --git a/Doc/Manual/Library.html b/Doc/Manual/Library.html
index 896cb217b..9f606fa3f 100644
--- a/Doc/Manual/Library.html
+++ b/Doc/Manual/Library.html
@@ -45,6 +45,9 @@
@@ -2327,6 +2330,24 @@ shared_ptr which has %naturalvar turned on in
%shared_ptr.
-
+
+
+ %attribute and friends have to be used on fully specified classes. For example
+
+
+
+%attributeref(A<int>, int, a);
+%inline %{
+ template <class T> struct A {
+ T a() const;
+ void a(T &);
+ };
+%}
+
+
+
+Note the use of a template-id (i.e., A<int> not A<T> or just A).
+This means that %attribute statements have to be repeated for any template-id that you want to use with %template.
+