Just to follow up on this discussion, if you set
__STL_MINIMUM_DEFAULT_TEMPLATE_PARAMS to 1 in stl_user_config.h
then you can indeed write
stack mystack; // Uses default deque
The downside of this is that now, if you DO want to override the default
then you have to use an alternate form like
stack<int, deque> mystack2;
The same applies to map<>, multimap<>, set<>, multiset<>, queue<> etc. This
is all documented in stl_user_config.h (probably in the docs too but I
didn’t look).
Rob Rutherford
“Jonathan Richardson” <jrichard@nospam.ise.bc.ca> wrote in message
news:8Ukd5.1765$47.68937@news.bc.tac.net…
Hello,
Your stack example should work fine. The second paramater is supposed to
default to a deque. I haven’t used stack yet but taking a look at it there
is some define called “__STL_LIMITED_DEFAULT_TEMPLATES” that probably gets
set in one of the config.h files. I think I would just specify the second
argument myself intead of playing with all the configuration ifdefs in
Stlport. eg:
stack<int, deque > mystack;
The default is a deque, you can use whatever you want…
And the Watcom compiler doesn’t support namespaces so you don’t need (and
can’t) the usual using namespace std; which is a bit unfortunate. There is
a
gcc port avail. for QNX but I haven’t used it too much. The gcc compiler
that comes with Neutrino is good though.
Let me know if you have any other questions.
Jon
Alexander Eisenhuth <> stacom@topmail.de> > wrote in message
news:> 39755B27.E220919F@topmail.de> …
Jonathan Richardson wrote:
What type of problems? I’m using the new version with no problems
other
than being able to compile the SGI iostreams…
Jon
Thanks for the response.
problem with container:
#include <stack
main () {
stack buffer;
}
wpp386 -d3 -db -bt=QNX -hw -i=/prj/gmc/dvp/STLport-4.0/stlport -i=/usr/inclu
de
-i=…/inc test.cpp
WATCOM C++32 Optimizing Compiler Version 10.6
Copyright by WATCOM International Corp. 1989, 1996. All rights reserved.
WATCOM is a trademark of WATCOM International Corp.
test.cpp(5): Error! E213: (col 18) class template requires more
parameters
for
instantiation
test.cpp: 7 lines, included 9832, no warnings, 1 error
make: *** [test.o] Error 2
Also wpp seems not to know the using keyword
…
using namespace std;
…
test.cpp(3): Error! E336: (col 20) declaration specifiers are required
to
declare ‘using’
test.cpp(3): Error! E498: (col 7) syntax error before ‘namespace’;
probable
cause: incorrectly spelled type
Alexander