Thanks for the explanation.
Yes, what the compiler/linker does is completely clear to me. I think my question should have been "Is there a different approach which I could take to prevent expressions in 'const string&' go through the compiler?"
Maybe with type-traits, or by declaring the template only to apply for non-consts?
I am out of ideas there...
> you need to implement the template function template<typename ANY> void func(ANY&)
Hm, maybe I can see what you mean... if I'll write
template<typename ANY> void func(ANY& val)
val = val;
I would get a compiler error when val ist const&. How silly of me... I will try that out immediatly!