I have an interface
std::string
get_string(Source const &s, std::string const &d);
int
get_int(Source const &s, int const &d);
bool
get_bool(Source const &s, bool const &d);
which I'd like to change to
template<class T>
T
get(Source const &s, T const &d);
But there's no sensible base template, so the actual base definition is a legal but useless (return d;
). What can I do to force compile-time failure if the base is instantiated? Is there an idiomatic solution for this situation?