RTTI data member names, NTBS COMDAT

Martin von Loewis loewis at informatik.hu-berlin.de
Fri Sep 1 09:06:51 UTC 2000


> On the source file level:
> 
>   #define array_type_info ...

On its own, it's not a problem to just have that define. You'd have to
write

#define base_type const int
#include <cxxabi.h>

int main(){}

My point is that users have to make an explicit choice to use the
header. When she does, she's responsible for respecting its
requirements.

I recently ran into the problem that a #define min(a,b) ... would
conflict with numeric_limits::min(). As a user, if I chose to use some
features, I have to accept the consequences.

As a pointed out, there is no problem from a formal point of standards
compliance. There is also likely no practical problem: Most users have
the convention of writing #defines in all-uppercase. That won't
conflict with our field names.

To further strengthen my point, I tried to establish prior uses of the
field names:

type_name: gtk/gtktypeutils.h uses it as a field name
           octave-2.0.16/ov-base.h as a method name
flags:     member of ios_base
context:   Parameter name in Xm/Xm.hbase_count
base_type: RogueWave's C++ library uses this as a typedef name in many
           places

I could not find uses for the other names below, including no
occurence in #define

base_info flag_masks non_diamond_repeat_mask diamond_shaped_mask
offset_flags offset_flags_masks virtual_mask public_mask offset_shift
pointee const_mask volatile_mask restrict_mask incomplete_mask
incomplete_class_mask

So I think it would be formally acceptable, practically reasonable and
convenient for users to change the names.

Regards,
Martin




More information about the cxx-abi-dev mailing list