This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/24588] Fails to identify template using local classes



------- Comment #3 from igodard at pacbell dot net  2005-10-31 00:53 -------
Here's an example that shows that A<E>::iterator depends on E:

template<typename E>
class A {
public:
    class iterator {
        E dummy;
        };
    iterator iter;
    };

int main( int argc, char *argv[] ) {
    A<int> first;
    A<bool> last;
    first.iter = first.iter;  // works
    first.iter = last.iter;  // fails
    return 0;
    }

If it did not depend on E then both assignments would work.

Ivan


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24588


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]