<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Hi Tim,<br>
<br>
Thomas Grill a écrit :
<blockquote cite="mid30b31dddb05104464bc78fc58fade569@grrrr.org"
type="cite">Hi Tim,
<br>
this seems to be a speciality of the gcc 3.4 compiler... i'll have to
check for that - a bit later
<br>
<br>
</blockquote>
Yes, I'm using 3.3 here and the begin() and end() methods works fine...
<br>
These changes between 3.3 and 3.4 are listed here :<br>
<br>
<a class="moz-txt-link-freetext" href="http://gcc.gnu.org/gcc-3.4/changes.html#cplusplus">http://gcc.gnu.org/gcc-3.4/changes.html#cplusplus</a><br>
<br>
I think there are two passages that interests us, First :<br>
<br>
You must now use the <code>typename</code> and <code>template</code>
keywords to disambiguate dependent names, as required by the C++
standard.
<pre>        struct K {
         typedef int mytype_t;
        };
        
        template <class T1> struct A {
         template <class T2> struct B {
         void callme(void);
         };
         template <int N> void bar(void)
         {
         // Use 'typename' to tell the parser that T1::mytype_t names
         // a type. This is needed because the name is dependent (in
         // this case, on template parameter T1).
         typename T1::mytype_t x;
         x = 0;
         }
        };
        template <class T> void template_func(void)
        {
         // Use 'template' to prefix member templates within
         // dependent types (a has type A<T>, which depends on
         // the template parameter T).
         A<T> a;
         a.template bar<0>();
         // Use 'template' to tell the parser that B is a nested
         // template class (dependent on template parameter T), and
         // 'typename' because the whole A<T>::B<int> is
         // the name of a type (again, dependent).
         typename A<T>::template B<int> b;
         b.callme();
        }
        
        void non_template_func(void)
        {
         // Outside of any template class or function, no names can be
         // dependent, so the use of the keyword 'typename' and 'template'
         // is not needed (and actually forbidden).
         A<K> a;
         a.bar<0>();
         A<K>::B<float> b;
         b.callme();
        }</pre>
But I've checked the code and template and typename seems well placed...<br>
<br>
Second :<br>
<br>
In a template definition, unqualified names will no longer find members
of a dependent base (as specified by [temp.dep]/3 in the C++ standard).
For example,
<pre>        template <typename T> struct B {
         int m;
         int n;
         int f ();
         int g ();
        };
        int n;
        int g ();</pre>
<br>
<pre>        template <typename T> struct C : B<T> {
         void h ()
         {
         m = 0; // error
         f (); // error
         n = 0; // ::n is modified
         g (); // ::g is called
         }
        };</pre>
<p>You must make the names dependent, e.g. by prefixing them with <code>this-></code>.
Here is the corrected definition of <code>C<T>::h</code>,</p>
<pre>        template <typename T> void C<T>::h ()
        {
         this->m = 0;
         this->f ();
         this->n = 0
         this->g ();
        }</pre>
<br>
Perhaps if you just add this-> before begin() and end() at lines 72
& 80, it will works, but it seems too simple..<br>
I see no other differences but I'm not a C++ specialist, has anyone got
an idea?<br>
<br>
Greetings,<br>
<br>
Nicolas<br>
<br>
<br>
</body>
</html>