D
Dilip
I am stumbling my way through C++ templates and I keep running into way
too many questions. Here is one:
If a library writer exposes a function template like so:
template<typename T>
void some_func(T const& x)
{
}
Lets say the client code explicitly instantiates it:
template void some_func(int);
Later if the library writer releases a new version that explicitly
specializes this template for the same data type, what happens to the
client code? The book I am reading says this issue is still pending
with C++ committee. Has there been any decisions taken?
Or am I asking the question backwards? maybe client code is never
allowed to explicitly instantiate function/class templates from a
library?
too many questions. Here is one:
If a library writer exposes a function template like so:
template<typename T>
void some_func(T const& x)
{
}
Lets say the client code explicitly instantiates it:
template void some_func(int);
Later if the library writer releases a new version that explicitly
specializes this template for the same data type, what happens to the
client code? The book I am reading says this issue is still pending
with C++ committee. Has there been any decisions taken?
Or am I asking the question backwards? maybe client code is never
allowed to explicitly instantiate function/class templates from a
library?