Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] visibility of typedefs/type aliases

I agree that typedefs require special treatment. Will you be willing to give it a shot?


On Wed, Feb 12, 2014 at 9:12 AM, scalpel4k <scalpel4k@xxxxxxxxx> wrote:

I've run CDT with the debugger and found this check in (line 955ff)

if (member instanceof IType &&
     memberBinding instanceof IType &&
     ((IType) member).isSameType((IType) memberBinding) )
        return visibility;

what this does in case of member == typedef or type alias, isSameType check
returns the visibility of the underlying type. As far as I know this isn't
correct, at least not in C++11. A typedef can change the visibility of its
base type.
My question here is, are there any other situations where this check is
required? Otherwise typedefs have to be treated separately.

I ask this question with respect to
where you can find a code example.

thx Michi
cdt-dev mailing list

Back to the top