5
बाहरी टेम्पलेट का उपयोग करना (C ++ 11)
चित्र 1: फ़ंक्शन टेम्प्लेट TemplHeader.h template<typename T> void f(); TemplCpp.cpp template<typename T> void f(){ //... } //explicit instantation template void f<T>(); main.cpp #include "TemplHeader.h" extern template void f<T>(); //is this correct? int main() { f<char>(); return 0; } क्या यह उपयोग करने का सही तरीका है extern template, या क्या …