Thoughts Serializer

GCC vs MSVC the Rematch

If you remember from the GCC vs MSVC post, I had a problem with templates and GCC. I looked further in to the problem and I found this on some GCC release notes :

So the problem was the missing typename keyword to be compliant to the standard.

So this code :

template <class C>
void dostuff(C v){
    C::iterator i;
}

Must be turned into this code :

  void dostuff(C v){
      typename C::iterator i;
  }

And GCC is happy as a puppy! I love happy ends…