What you also can try is explicit instantiation:
template class vector<int>; // class
template int& vector<int>::operator[](int); // member
template int convert<int,double>(double); // function
More Related Contents:
- What exactly is “broken” with Microsoft Visual C++’s two-phase template instantiation?
- Is it possible to force c++ class instantiation on the heap?
- Why do I get “unresolved external symbol” errors when using templates? [duplicate]
- Does C++ support compile-time counters?
- C++ function template partial specialization?
- C++ invoke explicit template constructor
- How does `is_base_of` work?
- constexpr if and static_assert
- How to achieve “virtual template function” in C++
- Deduce template argument from std::function call signature
- Difference between instantiation and specialization in c++ templates
- Select class constructor using enable_if
- Is there any difference between “T” and “const T” in template parameter?
- C++ convert integer to string at compile time
- Forwarding all constructors in C++0x
- How to know if a type is a specialization of std::vector?
- C++ : friend declaration ‘declares a non-template function
- Specify template parameters at runtime
- Lambda expressions as class template parameters
- Using export keyword with templates
- Default template parameter partial specialization
- std::remove_const with const references
- templated typedef?
- std::enable_if : parameter vs template parameter
- calculating factorial using template meta-programming
- Templates: template function not playing well with class’s template member function [duplicate]
- Dependent scope and nested templates
- Can I use the result of a C++17 captureless lambda constexpr conversion operator as a function pointer template non-type argument?
- Check if a type is passed in variadic template parameter pack
- Concatenate compile-time strings in a template at compile time?