To get that code to link a with the -fno-implicit-templates there are
two explicit instantiation that you need to do (although, I think one of then is not necessary. see below...)
The following compiles, links and runs..
//using namespace std;
TCbDoubleBridgeBase_Candidates(int AI, int AJ)
inlinebooloperator < (const TCbDoubleBridgeBase_Candidates &other) const
template <typename T>
templateclass CMain<TCbDoubleBridgeBase_Candidates>; //the straightforward one - I'm not sure you need this one to be explicit
templateclass std::vector<TCbDoubleBridgeBase_Candidates>; //you will need this one though..
//You could put the explicit instantiations here instead of before main if you prefer
Does it work on your computer?
In my one refuses int both cases (4.5.3 under cygwin and 4.7.2 under kubuntu)
output for cygwin:
$ gcc -fno-implicit-templates ex.cpp
/tmp/ccm9LSKx.o:ex.cpp:(.text+0x4a): undefined reference to `std::ios_base::Init::Init()'
/tmp/ccm9LSKx.o:ex.cpp:(.text+0x65): undefined reference to `std::ios_base::Init::~Init()'
/usr/lib/gcc/i686-pc-cygwin/4.5.3/../../../../i686-pc-cygwin/bin/ld: /tmp/ccm9LSKx.o: bad reloc address 0xd in section `.text$_ZN5CMainI30TCbDoubleBridgeBase_CandidatesED1Ev[CMain<TCbDoubleBridgeBase_Candidates>::~CMain()]'
/usr/lib/gcc/i686-pc-cygwin/4.5.3/../../../../i686-pc-cygwin/bin/ld: final link failed: Invalid operation
To be honest - the way I would figure out a situation like this would be to:
make sure the thing build completely without the -fno-implicit-templates option.
Then build with the -fno-implicit-templates option.
Any items that suddenly go MIA are the one that you need to
((For the record I tried both G++ 3.4.5 and G++ 4.6.2 using codeblocks on windows
and although they gave sliglty different results, the issue of std::ios didn't come
up - it might well depends on what other baggage your ide/build system automatically includes ))