From bcb6370b0e8a074dbabcb867168c5fd3f7075fb5 Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Sun, 20 Feb 2005 23:05:14 +0000 Subject: [PATCH] fix for obviously broken class Rational example [SVN r27457] --- doc/tutorial/doc/tutorial.qbk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/tutorial/doc/tutorial.qbk b/doc/tutorial/doc/tutorial.qbk index 23b27649..b673e425 100644 --- a/doc/tutorial/doc/tutorial.qbk +++ b/doc/tutorial/doc/tutorial.qbk @@ -661,13 +661,13 @@ similar set of intuitive interfaces can also be used to wrap C++ functions that correspond to these Python ['special functions]. Example: class Rational - { operator double() const; }; + { public: operator double() const; }; Rational pow(Rational, Rational); Rational abs(Rational); ostream& operator<<(ostream&,Rational); - class_() + class_("Rational") .def(float_(self)) // __float__ .def(pow(self, other)) // __pow__ .def(abs(self)) // __abs__