From 00afe41a623f98a20b128cda80f47001223f87bf Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Sat, 28 Oct 2000 17:09:23 +0000 Subject: [PATCH] Change single-argument def to a template member function so that this file doesn't need to be generated in order to support arbitrary arguments. [SVN r8038] --- class_wrapper.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/class_wrapper.h b/class_wrapper.h index b383d263..d92f92a0 100644 --- a/class_wrapper.h +++ b/class_wrapper.h @@ -25,14 +25,14 @@ class ClassWrapper } // define constructors - template - void def(Constructor signature) + template + void def(const Signature& signature) { m_class->def(signature); } // define member functions. In fact this works for free functions, too - // they act like static member functions, or if they start with the - // appropriate self argument (as a pointer), they can be used just like - // ordinary member functions -- just like Python! + // appropriate self argument (as a pointer or reference), they can be used + // just like ordinary member functions -- just like Python! template void def(Fn fn, const char* name) { m_class->def(fn, name); }