Boost logo

Boost :

From: David Abrahams (abrahams_at_[hidden])
Date: 2000-10-27 19:46:49


I'm not sure whether I want to respond to this issue. The C++ language
specification makes structs and classes equivalent except for default access
rights to members and bases. Only Microsoft (incorrectly) makes a
distinction between class and struct, making it dangerous to rewrite a
struct as a class, or vice-versa, because it changes the type's name
mangling in function signatures. After having had to work around so many of
MSVC's deficiencies, I am reluctant to make yet another concession to its
broken implementation of the language. Have you tried running Doxygen over
the source code? It will produce a complete HTML class browser and more.


----- Original Message -----
From: "Mark Evans" <mark.evans_at_[hidden]>
To: "David Abrahams" <abrahams_at_[hidden]>
Sent: Friday, October 27, 2000 7:00 PM
Subject: Class vs. Struct

> Another problem in py_cpp is the use of "struct" instead of
> "class". This usage causes the class to disappear from the class
> viewer in MSVC and makes the code harder to navigate.
> Here's an example of a struct that ought to be a class.
> template <class PythonType>
> struct BaseObject : PythonType
> {
> typedef PythonType BasePythonType;
> // Initializes type and reference count. All other fields of
BasePythonType are 0
> BaseObject(PyTypeObject* type_object);
> // Decrements reference count on the type
> ~BaseObject();
> };
> Kind regards,
> Mark Evans
> mailto:mark.evans_at_[hidden]

Boost list run by bdawes at, gregod at, cpdaniel at, john at