Consider this
void f(vector& p)
{
}
int main()
{
vector nonConstVec;
f(nonConstVec);
}
The followi
Both vector and vector are completely different types. Even if you write const T* inside your main(), your code wont compile. You need to provide specialization inside main.
The following compiles:
#include
using namespace std;
template
void f(vector& p)
{
}
int main()
{
vector nonConstVec;
f(nonConstVec);
}