OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.old-deja/] [g++.ns/] [koenig3.C] - Rev 816

Compare with Previous | Blame | View Log

// { dg-do run  }
//Check association of member pointer in overload resolution.
struct A {
        int m_val;
        friend int operator ->* (A & other, int A::*pm)
                { return 31; }
};

int A::*pi = & A::m_val;

int
main(void)
{
        A c;
        c.m_val = 42;
        int j = c ->* pi;

        if (j == 31)
                return 0;
        else
                return 1;
}       

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.