This is the mail archive of the gcc-help@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]

incompatibility between g++ and vc++ (again)


Hello,

i have another problem with vc+ and gcc. gcc does not like the syntax i
show below, whereas vc+ does not complain. Here is  piece of code:


class Dimension
{ ...
  template <int bps> Dimension Turn() const {.....} 
  ...
};


template <int bpp> class LeftTurner
{

public:

  BufferWindow operator()(BufferWindow const& source) const
  {
    BufferWindow result( source.GetDimension().Turn<bpp>(),
source.GetEnvironment() );

    //...

    return result;
  }

};

gcc does not like Turn<bpp>() in the leftturner class. I have the
following error : 
 
../../src/core/bufferwindow/leftturner.h: In member function
`avs::BufferWindow avs::bw::LeftTurner<bpp>::operator()(const
avs::BufferWindow&) const':
../../src/core/bufferwindow/leftturner.h:47: error: syntax error before
`;' token

I can trasform Turn into a "real" function. But i prefer not doing that.

Does someone understand why it does not work with g++ ?

Thank you !

Vincent TORRI



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