Hello,

I usually compile my code with the MSVC compiler but I tried yesterday to compile it on Mac OS X with GCC.

I have a function declared like that :

Qt Code:
  1. void myfunction(const QHash<QString, QVariant> &callback = QHash<QString, QVariant>());
To copy to clipboard, switch view to plain text mode 

It compiles well in MSVC but it seems GCC as some troubles with such a construct.

I have changed my code to take a pointer :

Qt Code:
  1. void myfunction(const QHash<QString, QVariant> *callback = 0);
To copy to clipboard, switch view to plain text mode 

But is there a way to keep a construct without pointer which accept such an optionnal parameter with a template class ?