I want to do the following:
QThreadStorage<QSharedPointer<sqlite3>> database;
but the editor is reporting a syntax error. Is this not possible?
The problem is that >> at the and of your expression is parsed as a bit-shift operator instead of end of template. It was fixed in c++11 but in previous versions of c++ you need to add a space between angle brackets : QThreadStorage<QSharedPointer<sqlite3> > database;
>>
is interpreted as an operator rather than nested generics in pre-C++11.
You'll need to upgrade your compiler, or just leave a space between them, like > >
.