"default template arguments may not be used in function templates"

Vincent Torri Vincent.Torri@iecn.u-nancy.fr
Mon Jul 4 16:46:00 GMT 2005


Hello,

I have the following class:

template <typename T, typename Synchronizer = synchronizer::None, typename
Creator = T * (*)()>
class value_cache
{
  ***

public:  //interface

  boost::shared_ptr<T> Get() const
  {
    Synchronizer synchronizer();

    ***
    ***
  }
};

But gcc reports this error message at compile time:

"default template arguments may not be used in function templates"

for the declaration of synchronizer().

I use gcc 3.3.4

Does someone see the problem ?

Thank you

Vincent Torri



More information about the Gcc-help mailing list