Boost logo

Boost :

From: Paul Mensonides (pmenso57_at_[hidden])
Date: 2003-01-11 21:26:54


----- Original Message -----
From: "Gennaro Prota" <gennaro_prota_at_[hidden]>

> >Incidently, an unnamed type has no linkage.
>
> I think the issue is a little more subtle in that a) it's names that
> have or don't have linkage, not types b) a typedef allows you to give
> a name, for linkage purposes, to what C++ calls an 'unnamed type',
> e.g.:
>
> typedef struct { int n; } s;

Yeah. However, this doesn't really apply to what I'm talking about with:

enum { a, b, c };

Yes, for linkage purposes 'enum xyz { }' is equivalent to 'typedef enum { }
xyz'.

> Oops. X here has still external linkage, though of course you don't
> know its "linkage name" and thus cannot refer it from another
> translation unit.

Yeah, my mistake. Sorry!

Paul Mensonides


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk