source file of the Flower Library
- (c) 1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+ (c) 1997--2003 Han-Wen Nienhuys <hanwen@cs.uu.nl>
*/
*/
-// fix constness: gcc-2.95 is correct in defining
-// typeof (*this)
-// in a const member function to be const
-
-#if 0
-#define VIRTUAL_COPY_CONS(base) \
- virtual base *clone () const \
- { \
- return new typeof (*this) (*this); \
- }
-#else
+/*
+ fix constness: gcc-2.95 is correct in defining
+
+ typeof (*this)
+
+ in a const member function to be const
+*/
#define VIRTUAL_COPY_CONS(base) \
virtual base* clone_const_helper () \
{ \
base* urg = (base*)this; \
return urg->clone_const_helper (); \
}
-#endif
+
#endif /* VIRTUAL_METHODS_HH */