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] |
No. The header file did not declare the specialization, so the specialization was called without being declared.
But int your example, isn't the <int> specialization visible at the point the call is made - even if it is through the header file?
// Binky.h #ifndef BINKY_H #define BINKY_H template<typename T> const char* getString() { return "T"; } template<> const char* getstring<int>(); #endif
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |