[cxx-abi-dev] Decltype mangling and type dependency
David Vandevoorde
daveed at edg.com
Mon Jun 21 21:51:06 UTC 2010
On Jun 19, 2010, at 5:12 PM, Jason Merrill wrote:
> On 06/19/2010 03:52 PM, Mike Herrick wrote:
>> Could you expand on that? How might access control depend on the template parameters in f1 above?
>
> template <class T> struct B;
>
> class A
> {
> int i;
> friend struct B<int>;
> } a;
>
> template <class T>
> struct B
> {
> decltype (a.i) f() { }
> };
>
> B<int> b; // OK, B<int> is a friend of A
> B<float> b2; // error, a.i is private
But that's an error: The mangling doesn't matter at that point, no?
I didn't think there is a valid case where access is the only disambiguator between two entities (from a mangling perspective, in particular). Did I get that wrong?
[...]
Daveed
More information about the cxx-abi-dev
mailing list