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]

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


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


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