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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux