Suppose I am a user of a Certain Template Library (CTL) which defines a template, named, say, Hector
template <class T>
class Hector {...};
And in its documentation it gives many guarantees about Hector template behavior.
But then it also defines a specialization for a certain type Cool
template <>
class Hector<Cool> {....};
The purpose of the specialization is a more optimized implementation of Hector, but unfortunately because of this optimization many guarantees of Hector are violated.
Currently I really don't need the optimization, I'd rather preserve all the guarantees of Hector. Is there any way I could, without changing the library code (CTL is a highly respectable library, you know), circumvent the specialization? Any way at all? Maybe write some sort of wrapper? Anything? I just want to the compiler to generate code for Hector<Cool> in a normal, non-optimized way, with all the guarantees.